The CS_LOCALE structure

The CS_LOCALE structure stores a complete set of localization information, including language, character set, collating sequence, and datetime formats.

Open Client and Open Server applications need to use a CS_LOCALE structure to define custom localization values for a context, connection, thread, data element, or routine.

StepsTo use a CS_LOCALE structure

  1. Call cs_loc_alloc to allocate a CS_LOCALE structure.

  2. Call cs_locale to load the CS_LOCALE structure with the desired localization values. For more information about this process, see “The cs_locale routine”.

  3. If necessary, call cs_dt_info(CS_SET,CS_DT_CONVFMT) to change the date conversion format in the CS_LOCALE structure. For more information on cs_dt_info, see the Open Client and Open Server Common Libraries Reference Manual.

  4. Use the loaded CS_LOCALE structure to customize a context, connection, thread, data element, or routine:

  5. To define custom values for a routine, pass a pointer to the CS_LOCALE structure to the routine.