[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Translations' (#lazutils)

GetLanguageIDFromLocaleName

Gets the language identifier found in the specified locale identifier.

Declaration

Source position: translations.pas line 191

function GetLanguageIDFromLocaleName(

  LocaleName: string

):TLanguageID;

Arguments

LocaleName

  

String with the language, region, and optional code page for a locale.

Function result

TLanguageID with the values found in LocaleName.

Description

GetLanguageIDFromLocaleName is a TLanguageID function used to get a language identifier for the values in LocaleName. LocaleName contains a value which consists of the following:

[lang][_region][.codeset][.modifier]
[lang]
Language code (ISO 639-1 or 639-2).
[_region]
Region (ISO 3166 country code).
[.codeset]
Code set (optional/currently ignored).
[.modifier]
Modifier (optional/currently ignored),

For example:

Values are parsed and stored in the corresponding members in the TLanguageID return value.

GetLanguageIDFromLocaleName is used in the implementation of the GetLanguageID routine for platforms other than Windows.

See also

GetLanguageID

  

Gets a record with the language code and country code for the current system locale.

TLanguageID

  

Record type used to return language and country codes/identifiers for a locale.


Version 4.0 Generated 2025-05-03 Home