Skip to content

Oefenweb/python-glibc-locale-tools

Repository files navigation

glibc-locale-tools

Build Status

glibc-locale-tools provides some tools to work with (glibc) locale files (e.g. LC_MONETARY, LC_NUMERIC, LC_TIME)

Requirements

  • Python 2.6 seems to work but running tests fails
  • Python 2.7

Usage

locale-extract-category

Extracts a given LC_* section (category) from a locale file.

bin/locale-extract-category < \
  glibc_locale_tools/test/data/nl_NL LC_TIME > \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.actual;

NOTE: This can be useful because some (web) framework, for instance CakePHP, use LC_TIME files to provide localisation.

locale-decode-category

Decodes a given LC_* (category) file to a human readable format.

bin/locale-decode-category < \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.expected > \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.decoded;

NOTE: This can be useful when you want to make changes in for instance LC_TIME. Use locale-encode-category to re-encode.

locale-encode-category

(Re)encodes a given LC_* (category) file to a machine readable format.

bin/locale-encode-category < \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.decoded > \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.encoded;

NOTE: This can be useful when you want to re-encode for instance LC_TIME.

References

About

Tools to work with (glibc) locale files (e.g. LC_MONETARY, LC_NUMERIC, LC_TIME)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published