Setting Locale on Linux Platforms

Linux® platforms manage locale settings with six locale categories. These are the same categories used by C standard library functions.

The following locale categories are available:

  • LC_CTYPE controls character data manipulations.

  • LC_COLLATE controls character collation/sorting operations.

  • LC_TIME controls date/time data formatting or parsing.

  • LC_NUMERIC controls numeric data formatting or parsing.

  • LC_MONETARY controls monetary data formatting or parsing.

  • LC_MESSAGES controls the user UI language.

Setting User Locale and User UI Language

Use the LANG environment variable to specify a single locale for all locale categories. The locale specified with this variable might be partially or entirely over-written by other environment variables.

Use the environment variables LC_CTYPE, LC_COLLATE, LC_TIME, LC_NUMERIC, and LC_MONETARY to specify a locale for a particular category.

Use the LC_ALL environment variable to over-write all locales specified with other environment variables. If a single locale has to be set to all locale categories, use LANG instead of LC_ALL.

Was this topic helpful?