DF_LOCALE_CODE

The ISO639 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 https://www.localeplanet.com/icu/iso639.html 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.

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 Local code in the current DataFlex program.

Procedure GetLocaleCode

    String sLocaleCode

 

    Get_Attribute DF_LOCALE_CODE to sLocalCode

End_Procedure

Example

This example sets the Local 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 sLocalCode

End_Procedure

 

Send SetLocaleCode "de-DE"