DF_LOCALE_CODE
The ISO 639 language code that is in use by DataFlex.
Level
Global
Supported by
All Drivers
Type
String, temporary
Access
Read / Write
Values
Any valid ISO 639 language code. See ISO 639 Language Codes for codes.
Driver Configuration Keyword
None
Remarks
String comparisons with Unicode are much more complicated than with OEM / ANSI. DataFlex 2020 and higher uses the ICU Library for comparing strings according to the Unicode standards. Multiple collations are supported and can be configured via the DF_LOCALE_CODE attribute.
It can be changed at runtime and defaults to the language of the operating system.
Note that when using the embedded database, the indexes will be built up according to the old collating system configured via DF_Collate.cfg for backwards compatibility.
Example
This example returns the locale code in the current DataFlex program.
Procedure GetLocaleCode
String sLocaleCode
Get_Attribute DF_LOCALE_CODE to sLocaleCode
End_Procedure
Example
This example sets the locale code of the current DataFlex program to "de-DE", which is the ISO 639 locale code for German (Germany).
Procedure SetLocaleCode sLocaleCode
Set_Attribute DF_LOCALE_CODE to sLocaleCode
End_Procedure
Send SetLocaleCode "de-DE"