The CS_LOCALE structure stores a complete set of localization information, including language, character set, collating sequence, and datetime formats.
Open Client/Server applications need to use a CS_LOCALE structure to define custom localization values for a context, connection, thread, data element, or routine.
The steps in this process are as follows:
Call cs_loc_alloc to allocate a CS_LOCALE structure.
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”.
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.
Use the loaded CS_LOCALE to customize a context, connection, thread, data element, or routine:
To customize a context, call cs_config.
To customize a connection, call ct_con_props.
To customize a thread, call srv_thread_props.
To define custom values for a data element, supply a pointer to the CS_LOCALE in a CS_DATAFMT structure.
To define custom values for a routine, pass a pointer to the CS_LOCALE to the routine.