Before writing an internationalized Open Client/Server application, you must decide how the application will localize, that is, how it will determine which language, character set, and cultural conventions to use in a given environment.
Open Client/Server applications can use initial localization values, custom localization values, or both:
Initial localization values are determined at runtime, when the application allocates a context structure (cs_ctx_alloc):
If the LC_ALL environment variable is set, the application will use its value to localize the new context structure.
If the LC_ALL environment variable is not set but the LANG environment variable is set, the application will use its value to localize the new context structure.
If neither environment variable is set, the application uses the “default” entry in the locales file to localize the new context structure.
An application sets up custom localization values by calling cs_locale to fill a CS_LOCALE structure and then using the CS_LOCALE structure to change localization values for a context, connection, thread, data element, or routine.