Loading...
 

CX_SYSTEM_OBJECT::CreateSublocales

CX_SYSTEM_OBJECT::CreateSublocales

Description:

This function loads a locale and all locales directly or indirectly subordinated to it from the locale definition file (see CX_LOCALE_FILENAME) and returns the locale. The country and state code can have a value between 0 and 255. The region code can be of any length and can indicate the hierarchy of the regions, each region being separated by a "; ". If no region is to be loaded, an empty character string ("") must be passed. If no state information is to be accessed either, the state code takes the value "-1".

The result is always the locale that is most precisely specified in the hierarchy, i.e.

  • Country, if no state is specified
  • State, if no region is indicated
  • The region if only one is specified, otherwise the lowest specified region

Code example:

In the example programme, the state "001" of the country "049" and all its subordinate regions are loaded.

049 001 "" SystemObject Call(CreateSublocales)

The following example loads the locale of country 049, state 001 and in it the region 001;006;002 loaded. So the hierarchy has 5 levels and the returned locale object has the region code "002".

049 001 "001;006;002" SystemObject Call(CreateSublocales)

Stack
Stack Position Object type Brief description
Stack Position Object type Description
Stack(In) Top 1 STRING the region code
top 2 INTEGER the state code
Top INTEGER the country code
Stack(Out) Top CX_LOCALE the locale object
Function call: Call(CreateSublocales)