Table 3-2 describes how to define custom localization values at the context level:
| Step | Application step | Purpose | Details | 
|---|---|---|---|
| 1 | Call cs_loc_alloc. | Allocate a CS_LOCALE structure. | This call copies the parent context’s current localization information into the CS_LOCALE structure. | 
| 2 | Call cs_locale. | Overwrite the CS_LOCALE structure with custom localization values. | For more information about this process, see “The cs_locale routine”. Open Server applications must call cs_locale with type as CS_LC_ALL. This ensures that Server-Library loads the CS_LOCALE structure with localization values that are internally consistent. | 
| 3 | Optionally, call cs_dt_info. | Change datetime conversion formats in the CS_LOCALE structure. | For more information about cs_dt_info, see the Open Client and Open Server Common Libraries Reference Manual. | 
| 4 | Call cs_config with property as CS_LOC_PROP | Customize a context. | |
| 5 | Optionally, call cs_loc_drop. | Deallocate the CS_LOCALE structure. | An application can reuse the CS_LOCALE structure before deallocating it. If necessary, the application can call cs_locale to change the localization values in the structure before reusing it. |