Using a CS_LOCALE structure

A CS_LOCALE structure defines localization values. An application uses the CS_LOCALE structure to define custom localization values at the context, connection, and data element levels.

To do this, an application:

  1. Calls cs_loc_alloc to allocate a CS_LOCALE structure.

  2. Calls cs_locale to load the CS_LOCALE with custom localization values. Depending on what parameters it is called with, cs_locale may search for the LC_ALL, LC_CTYPE, LC_COLLATE, LC_MESSAGE, LC_TIME or LANG environment variables.

  3. Uses the CS_LOCALE. An application:

  4. Calls cs_loc_drop to deallocate the CS_LOCALE.