Loading...
 

CX_COUNTRY_LOCALE - Country specific data

CX_COUNTRY_LOCALE

Class hierarchy
Description:

A country locale is used to manage all country-specific information. The settings for the USA are implemented by default.

If a new country is to be included in the locales file (see also CX_LOCALE_FILENAME), the entry must begin with the keyword "COUNTRY". This is followed by the definitions of the individual pieces of information, whereby only those differing from the USA must be included. This does not apply to the countryCode, which must be specified. The following list shows all information contained in a country locale and what the default setting looks like. The information in the locales file is given by the field name followed by an "=" and the desired setting. All settings that are placed in inverted commas represent strings, whereby their length is arbitrary, so that, for example, the definition for the minus sign does not have to consist of only one character.

List of methods (MDI)
Function MA* Parameters Return Brief description
NewHoliday OBJECT add new holiday
RemoveHoliday OBJECT deletes a holiday
SortedHolidays COLL returns all holidays in ascending order
AllHolidayObjects (OBJECT, OBJECT, INTEGER) COLL delivers all holidays in one period
BaseCentury INTEGER provides current century
BaseCenturyMA * Current century input/output
CodeMap INTEGER get the codepage
CodeMapMA * Codepage input/output
Country STRING get the country name
CountryCode INTEGER get a country code
CountryCodeMA * the country code input/output
CountryMA * Country name input/output
CurrencyUnitPrecedes INTEGER Shows by means of a truth value whether a currency unit should be displayed before the value or after the value. If the value is set to 1, the unit is displayed before the value.
CurrencyUnitPrecedesMA * Position of a currency unit input/output.
CurrencyUnitSeparation INTEGER Shows by means of a truth value whether a space should be displayed between a currency unit and the value (no matter in which order).
CurrencyUnitSeparationMA * Space between a currency unit input/output
DateFormat INTEGER returns the current date format
DateFormatMA * Date format input/output
DateSeparator STRING get the separator for a date
DateSeparatorMA * Separator for a date input/output
DecimalSeparator STRING get the separator for decimal numbers
DecimalSeparatorMA * Separator for decimal numbers input/output
DiallingPrefix STRING - obsolete/ deprecated -
DiallingPrefixMA * - obsolete/ deprecated -
EndTimeZone INTEGER provides the end time zone of the country in minutes off the CET
EndTimeZoneMA * End time zone of the country Input/output
FirstDayOfWeek INTEGER delivers the first day of the week
FirstDayOfWeekMA * First day of the week Input/output
FractionSeparator STRING provides the separator for numerator and denominator for fractions
FractionSeparatorMA * Separator for numerator and denominator for fractions input/output
Grouping STRING returns the formatting character that indicates after how many digits a thousand separator is inserted in a number
GroupingMA * Formatting characters for thousands separator into a number Input/output
InsertHoliday OBJECT insert a new holiday
IntCurrencySymbol STRING provides the international currency symbol
IntCurrencySymbolMA * International currency symbol Input/output
IsAnniversary (OBJECT) INTEGER tests whether a day is a commemoration day
IsDateType (OBJECT, INTEGER) INTEGER tests whether a date is a special day off
IsHoliday (OBJECT) INTEGER tests whether a day is a public holiday
IsTerm (OBJECT) INTEGER tests whether a day is an appointment
IsVacation (OBJECT) INTEGER tests whether a day is a holiday
Language MLSTRING get the name of the language as multiple string
LanguageMA * Name of the language Input/Output
LanguagePos INTEGER returns the system number of the national language
LanguagePosMA * System number of the national language Input/output
LocaleCode STRING get the abbreviation of the country name
LocaleCodeMA * Abbreviation of the country name Input/output
LocaleName STRING current local name (country name)
MLLocaleName MLSTRING current local name (country name) as multilingual text
MLSpecialNameOfDay (OBJECT, INTEGER) MLSTRING get a specific multilingual (holiday) name of the day of a date
NegativeSign STRING returns the minus sign
NegativeSignMA * Minus sign input/output
NegSignPrecedes INTEGER Shows with the help of a truth value whether the minus sign comes before the number. If not, it is behind the number.
NegSignPrecedesMA * the position of the minus sign input/output
NegSpaceSeparation INTEGER Shows with the help of a truth value whether there should be a space between the sign and the number
NegSpaceSeparationMA * a space between the sign and the number Input/Output
NonCurrencyUnitPrecedes INTEGER Shows by means of a truth value whether a non-currency unit should be displayed before or after the value of aCX_VALUE. If the value is 1, the unit is displayed before the value.
NonCurrencyUnitPrecedesMA * Position of a non-currency unit of aCX_VALUE. Input/output.
NonCurrencyUnitSeparation INTEGER Shows with the help of a truth value whether a space should be displayed between a non-currency unit and the value (in whatever order) of a CX_VALUE.
NonCurrencyUnitSeparationMA * Controls spaces between the value and a non-currency unit of a CX_VALUE
NumPrecision INTEGER returns the number of decimal places
NumPrecisionMA * Number of decimal places input/output
PathOfLocale COLL the complete path of a locale
PositiveSign STRING get the plus sign
PositiveSignMA * Plus sign input/output
PosSignPrecedes INTEGER Shows with the help of a truth value whether the plus sign comes before the number. If not, it is behind the number.
PosSignPrecedesMA * the position of the plus sign input/output
PosSpaceSeparation INTEGER Shows with the help of a truth value whether there should be a space between the sign and the number
PosSpaceSeparationMA * a space between the sign and the number Input/Output
RawHolidays COLL delivers all holidays
SpecialNameOfDay (OBJECT, INTEGER) STRING get a specific multilingual (holiday) name of the day of a date
string INTEGER CX_STRING Returns the string representation of the object
SummerWinterChangeDate INTEGER provides the month in which the changeover from summer to winter time takes place
SummerWinterChangeDayDescription INTEGER provides the day of the week when the changeover from summer to winter time takes place
SummerWinterChangeTime STRING provides the changeover time from summer to winter time
ThousandsSeparator STRING get the separator for thousands of characters
ThousandsSeparatorMA * Separator for thousands of characters Input/output
TimeFormat INTEGER get the time format
TimeFormatMA * Time format input/output
TimeSeparator STRING get the separator for a time specification
TimeSeparatorMA * Separator for a time input/output
TimeZone INTEGER returns the start time zone of the country in minute deviation from the CET
TimeZoneMA * Start time zone of the country in minute deviation from the CET input/output
UnknownPartOfDate STRING returns the character for unknown parts of an incomplete date
UnknownPartOfDateMA * Character for unknown components of an incomplete date Input/output
WinterSummerChangeDate INTEGER provides the month in which the changeover from winter to summer time takes place
WinterSummerChangeDayDescription INTEGER provides the day of the week when the changeover from winter to summer time takes place
WinterSummerChangeTime STRING provides the changeover time from winter to summer time
WorkingDays INTEGER provides the working days of the country
WorkingDaysMA * Working days of the country Input/output

Data directory (DDI)
Field Type Meaning Example
countryCode ENUMSHORT Country code numeric ISO 3166-1 numeric 276 for Germany
localeCode STRING Country code alphanumeric according to ISO 3166-1 3alpha "DEU" or "USA"
language MLSTRING Name of the language as multiple string T("English")
languagePos CHAR Index of the national language 1
name MLSTRING Designation of the country as multiple string T("USA")
codeMap CHAR Codepage 850
diallingPrefix STRING - obsolete/deprecated - use DIALTRANSLATION TABLE
decimalSeparator STRING Separator for decimal numbers "."
thousandsSeparator STRING Separator for thousands of characters ","
grouping STRING Formatting characters that indicate after how many digits a thousand separator is inserted in a number "\3"
positiveSign STRING Plus sign "+"
posSignPrecedes CHAR Indicates with the help of a truth value whether the plus sign is placed before the number. If not, it is behind the number. 1
posSpaceSeparation CHAR Specifies with the help of a truth value whether there should be a space between the sign and the number 0
negativeSign STRING Minus sign "-"
negSignPrecedes CHAR Indicates with the help of a truth value whether the minus sign is placed before the number. If not, it is behind the number. 1
negSpaceSeparation CHAR Specifies with the help of a truth value whether there should be a space between the sign and the number 0
nonCurrencyUnitPrecedes CHAR Specifies with the help of a truth value whether a non-currency unit should be displayed before the value or after the value. If the value is 1, the unit is displayed before the value. 0
nonCurrencyUnitSeparation CHAR Specifies with the help of a truth value whether a space should be displayed between a non-currency unit and the value (no matter in which order). 1
currencyUnitPrecedes CHAR Using a truth value, indicates whether a currency unit should be displayed before or after the value. If the value is 1, the unit is displayed before the value. 0
currencyUnitSeparation CHAR Specifies with the help of a truth value whether a space should be displayed between a currency unit and the value (no matter in which order). 1
numPrecision CHAR Number of decimal places 2
fractionSeparator STRING Separator for numerator and denominator for fractions "/"
intCurrencySymbol STRING International currency symbol "USD"
dateFormat CHAR Date formats:
0 (MM.DD.YYYY),
1 (DD.MM.YYYY) and
2 (YYYY.MM.DD)
0
dateSeparator STRING Separator for a date "/"
firstDayOfWeek CHAR First day of the week: 1 = Sunday, 2 = Monday 2
baseCentury SHORT Current century 19
unknownPartOfDate STRING Character for unknown components of an incomplete date "?"
timeFormat STRING Time format: 0 = 12 hours, 1 = 24 hours 0
timeSeparator STRING Separator for a time specification "."
timeZone SHORT Start time zone of the country in minute deviation from the CET -720
endTimeZone SHORT End time zone of the country in minutes off the CET -300
workingDays CHAR working days of the country:
0 = undefined,
1 = Monday,
2 = Tuesday,
4 = Wednesday,
8 = Thursday,
16 = Friday,
32 = Saturday,
64 = Sunday
0
day1 SHORT Day of the week when the changeover from winter to summer time takes place 429
pos1 SHORT running no. of this weekday in month 1
gran1 SHORT Reference area 1
freq1 SHORT Frequency 0
date1 INTEGER Month in which the changeover from winter to summer time takes place 4
changeTime1 STRING Changeover time from winter to summer time "2.00 - 3.00"
day2 SHORT Day of the week when the changeover from summer to winter time takes place 429
pos2 SHORT running no. of this weekday in month 99
gran2 SHORT Reference area 1
freq2 SHORT Frequency 0
date2 INTEGER Month in which the changeover from summer to winter time takes place 10
changeTime2 STRING Changeover time from summer to winter time "3.00 - 2.00"
accessCode STRING Own telephone number in international format; this entry MUST be available!
Enter as much as is known, i.e. for countries the country code, for cities the area code, etc.
"+1-"
further examples: "+49-", "+49-40-", "+49-40-209401-" for country, city and company
dialingTone STRING Code for obtaining an outside line ""
Example: "0", if a 0 must be dialled to get an outside line
maxLengthOfExtension SHORT Maximum length of extensions in your own company 0
Used to differentiate between internal and external calls
Example: In the case of two-digit extension numbers, a 2 must be entered here
DIALTRANSLATIONTABLE Start of the implementation table
ENDDIALTRANSLATIONTABLE End of the transposition table
upperLocale REL_1M superordinate locale
sublocales REL_M1 subordinate locale
sysLocale STRING Locale of the C-Standard Lib.

Use in AppsWH
Module Brief description
locales.mod Location-specific data Editing module
setlocal.mod Location selection basic module
wrldclck.mod World clock basic module

The changeover times from winter to summer time and vice versa are coded as periodic dates. In the standard setting, on the first Sunday in April at 2.00 am the changeover to summer time is made one hour ahead, while on the last Sunday in October at 3.00 am the changeover to winter time is made one hour back. In addition to this, nationwide public holidays can also be set for a country.

The information under "accessCode" and "DIALTRANSLATION TABLE" is inherited by subordinate locales. This means in practice that these data, which were configured for the COUNTRY Germany, are also valid for the federal states. As soon as the access code or conversion table is defined for a sub-locale, it replaces the inherited data.

Implementation table

The conversion table contains the entries for converting an international telephone number so that it can be typed in on the local telephone and the desired connection can be reached. The table must be located before the HOLIDAYS or the next COUNTRY, STATE or REGION section! An empty or non-existent table will result in incorrect interpretation of telephone numbers.

There is one entry on each line. Each entry has the form "x y", where x is the part to be replaced by the number and y is the part to be inserted instead. Example of such a table:

+49-40-209401-
+49-40-
+49- 0
+ 00

The local telephone is located in the business premises of the ClassiX® company. If the number +49-40-209401-12 is to be dialled, the part "+49-40-209401-" is replaced by "" (nothing). This leaves the 12th. If this is dialled, the extension 12 is reached. If +49-341-9733333 is to be dialled, the table is processed until the first hit is found. Here it only matches at +49-. This part is replaced by 0 and 0341-9733333 remains. For international numbers (country code not equal to 49) the + would be replaced by 00, which would make +1-222-333-4444 here 001-222-333-4444.

Examples:

Business premises company ClassiX®:

DIALTRANSLATIONTABLE
+49-40-209401-
+49-40-
+49- 0
+ 00
ENDDIALTRANSLATIONTABLE

Connections at the University of Leipzig:

DIALTRANSLATIONTABLE
+49-341-97-
+49-341-
+49- 0
+ 00
ENDDIALTRANSLATIONTABLE

US-American location:

DIALTRANSLATIONTABLE
+1-222-
+1- 1-
+ 011-
ENDDIALTRANSLATIONTABLE

(This location does not have a private branch exchange, so the entry with your own phone number is unnecessary).