Select a Locale

To select a locale category during program execution, call the setlocale function. This function has two arguments:

  1. category specifies the locale category. The LC environment variables that match the names of locale categories are:
  2. locale is the name of the locale from which to take the value for the category. You can use this argument in the following ways:

If you set environment variables inside a DOS session on the Windows operating system, the changes are not visible to setlocale.

Example: Select a Locale Explicitly by name

Example: Select a Locale Using Environment Variables



Internationalization


Make Your Program International
Customize a Locale
Convert Character Coding


Locale-Sensitive Interfaces
Locale Naming Conventions
Locales Provided on OS/2
Locales Provided on Windows