cs_locale and the locales file

Before using a CS_LOCALE structure to set custom localization values for a context, connection, or data element, a Client-Library application must call cs_locale to load the CS_LOCALE with the desired localization values.

In loading the CS_LOCALE structure, cs_locale:

  1. Determines what to use as a locale name:

  2. Looks up the locale name in the locales file to determine which language, character set, and sort order are associated with it.

  3. Loads the type of information specified by the type parameter into CS_LOCALE. For example, if type is CS_LC_CTYPE, cs_locale loads character set information. If type is CS_LC_MESSAGE, cs_locale loads message information.