The following environment variables are used to specify the names of locale categories. For example, you can supply one of these variable names as the parameter of the setlocale function, to select or change the locale category from a running program.
| Variable | Priority |
| LC_ALL | Highest |
| LC_COLLATE | |
| LC_MESSAGES | |
| LC_MONETARY | |
| LC_NUMERIC | |
| LC_SYNTAX | |
| LC_TIME | |
| LC_TOD | |
| LC_CTYPE | |
| LANG | Lowest |
LC_ALL specifies all categories for the associated locale.
The settings for LC_ALL will override any settings for individual LC_* categories. For example, if LC_ALL=jp_JP , any settings for LC_* are ignored.
Similarly, settings for LC_* categories will override the LANG setting, e.g., if LANG=en_US, and LC_NUMERIC=fr_FR, then all locale categories adopt default US settings, except LC_NUMERIC. As a result, one million appears as 1 000 000,00 rather than 1,000,000.
![]()
Application
Run-Time Environment Variables
![]()
Set Windows Run-Time
Environment Variables
Set OS/2 Run-Time
Environment Variables
Locale Categories