Unlike system locales, which represent standardized locale conventions, user locales are used to represent locally-configured preferences. Normally, user locales are created and modified by the user through the OS/2 Locale applet (also called the Country Palette). However, ULS also provides APIs for manipulating user locales programatically.

A user locale is created using the UniMakeUserLocale function. This function creates a new locale by copying an existing one (which may be either a system locale, or a previously-created user locale). Both the new and existing locales are specified by locale name.

A user locale is deleted using the UniDeleteUserLocale function; again, the locale is specified by name.

Specific items within a user locale may be modified using the UniSetUserLocaleItem function. This function takes as parameters the locale name, the locale item to be modified, the type of value being specified (which may be a codepage string, a UniChar string, or an integer, depending on the item type), and finally the new item value itself.

Saving user locale changes

Changes made to user locales (creations, deletions, or modifications) do not take effect beyond the current process until the UniCompleteUserLocale function is called. This function writes the entire set of user locales (with any outstanding changes) to disk.

User locale data is saved in the file USER.LOC under the directory \LANGUAGE\LOCALE on the OS/2 boot drive.


[Back] [Next]