ULSGetLocales

Gets the list of locales known to the system.

Locales may be either system locales (standardized locales defined by OS/2) or user locales (instantiated locale instances which appear in the Country Palette or "Locale" object).

Arguments
ULSGetLocales( [flag], stem )

Parameters

 * flag:Indicates which type of locales to list: system, user, or both.
 * Only the first character is significant, and (if specified) must be one of the following values:
 * B = List both user and system locales; this is the default.
 * S = List system locales only.
 * U = List user locales only.


 * stem:The name of a stem variable which will be populated with the list of locales.
 * .0 will contain an integer , indicating the number of locales found; and .1 through . will each contain a single locale name.

Return Value
The number of locales returned (the same as .0). If an error occurs, an empty string ("") is returned and the global ULSERR variable will be set to a non-zero value.

Example
Code /* Get a list of all user locales defined on the system */ CALL ULSGetLocales 'U', 'locales.' SAY 'There are' locales.0 'user locales defined:' DO i = 1 TO locales.0 SAY ' ->' locales.i END

Output There are 2 user locales defined: -> en_CA -> ja_JP