A.19 The Package Locales
geopolitical place or region and its associated language, which can be
used to determine other internationalization-related characteristics.
The library package
Locales has the following declaration:
Language_Code is new
String (1 .. 3)
Language_Code => E in
'a' .. 'z');
Country_Code is new
String (1 .. 2)
Country_Code => E in
'A' .. 'Z');
Language_Unknown : constant
Language_Code := "und";
Country_Unknown : constant
Country_Code := "ZZ";
The active locale
is the locale associated with the partition of the current task.
Language_Code is a lower-case string representation
of an ISO 639-3 alpha-3 code that identifies a language.
Country_Code is an upper-case string representation
of an ISO 3166-1 alpha-2 code that identifies a country.
Function Language returns the code of the language
associated with the active locale. If the Language_Code associated with
the active locale cannot be determined from the environment, then Language
Function Country returns the code of the country
associated with the active locale. If the Country_Code associated with
the active locale cannot be determined from the environment, then Country
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe