CVS difference for ai05s/ai05-0127-2.txt
--- ai05s/ai05-0127-2.txt 2010/06/13 02:48:42 1.2
+++ ai05s/ai05-0127-2.txt 2010/08/06 02:53:54 1.3
@@ -1,7 +1,9 @@
-!standard A.19(0) 10-06-05 AI05-0127-2/02
+!standard A.19(0) 10-08-05 AI05-0127-2/03
!class Amendment 10-06-01
+!status Amendment 2012 10-08-05
+!status ARG Approved 9-0-0 10-06-20
!status work item 10-06-01
!status received 10-06-01
@@ -44,14 +46,8 @@
-Add to normative references after 1.2(2):
+Add to normative references after 1.2(1):
-ISO/IEC 639-1:2002, Terminology and other language and content resources
-Codes for the representation of names of languages Part 1: Alpha-2 code
-ISO/IEC 639-2:1998, Terminology and other language and content resources
-Codes for the representation of names of languages Part 2: Alpha-3 code
ISO/IEC 639-3:2007, Terminology and other language and content resources
Codes for the representation of names of languages Part 3: Alpha-3 code for
comprehensive coverage of languages
@@ -63,7 +59,7 @@
Add a new clause:
-A.19 The Package System.Locale
+A.19 The Package Locales
@@ -76,8 +72,8 @@
type Language_Code is array (1 .. 3) of Character range 'a' .. 'z';
type Country_Code is array (1 .. 2) of Character range 'A' .. 'Z';
- Country_Unknown : constant Country_Code := "ZZ";
Language_Unknown : constant Language_Code := "und";
+ Country_Unknown : constant Country_Code := "ZZ";
function Language return Language_Code;
function Country return Country_Code;
@@ -89,7 +85,7 @@
internationalization related characteristics. The active locale is
the locale associated with the active partition.
-Language_Code is a lower-case string representation of an ISO 639-2/T
+Language_Code is a lower-case string representation of an ISO 639-3
alpha-3 code that identifies the language associated with the
@@ -154,7 +150,7 @@
provide portability, as application programmers can program specific locale
differences as needed once the current locale has been determined.
-A user application could relatively easy define a translation lookup
+A user application could relatively easily define a translation lookup
facility that accepted the current locale, and an application message
id to lookup a locale specific translation. Such a facility could
also lookup localization features such as those provided by the OS
@@ -181,15 +177,15 @@
Chinese zh zho chi zho+one of 13 subcodes
(eg cmn for mandarin)
-The Language function returns a lower-case 639-2/T alpha-3 string that
-represents the language of the current locale. The ISO 639-2 standard is
+The Language function returns a lower-case 639-3 alpha-3 string that
+represents the language of the current locale. The ISO 639-3 standard is
case insensitive for language codes, but recommends lower case for
code usage, which is why the Language function limits the return
result to lower case only. This simplifies client usage if clients
know they can expect the return values to be consistently in lower
-The decision to go with 639-2/T alpha-3 codes was driven by the fact that
+The decision to go with 639-3 alpha-3 codes was driven by the fact that
639-1 codes only cover the major languages in use. ISO 639-2 defines codes
for many more languages than 639-1, and generally covers all languages that
have significant bodies of literature, and covers most languages.
@@ -198,6 +194,15 @@
Apple OSX follow BCP 47 (RFC 4646), which states that when there is a choice
between the "T" code and the "B" code, the T code is the recommended choice.
+ISO 639-3 is a superset of ISO 639-2 that uses the 639-2/T codes instead of
+the 639-2/B codes, when there are two codes for a language in 629-2. 639-3
+also better deals with certain cases that are problematic in 639-2. For
+example, chinese is a macro language which has many dialects. In 629-2/T and
+639-3 this appears as the code "zho". However, if the current locale is more
+specificly defined to be Mandarin Chinese, 639-3 provides a code "cmn" for
+this purpose. 639-2 does not break down chinese any further than the macro
+language. Thus we selected the more detailed ISO 639-3 codes.
The definition of Language_Unknown is defined to "und" because ISO 639
defines that code to be used in situations in which a language or languages
must be indicated but the language cannot be identified.
@@ -289,9 +294,77 @@
+The following standards contain provisions which, through reference in
+this text, constitute provisions of this International Standard. At the
+time of publication, the editions indicated were valid. All standards
+are subject to revision, and parties to agreements based on this
+International Standard are encouraged to investigate the possibility
+of applying the most recent editions of the standards indicated below.
+Members of IEC and ISO maintain registers of currently valid International
+ISO/IEC 639-3:2007, @i<Terminology and other language and content resources
+@emdash Codes for the representation of names of languages @emdash Part 3:
+Alpha-3 code for comprehensive coverage of languages>
+ISO/IEC 1989:2002, @i<Information technology @emdash Programming languages
+ISO/IEC 3166-1:2006, @i<Information and documentation @emdash Codes for the
+representation of names of countries and their subdivisions @emdash Part 1:
+The following language-defined library package exists:
+@xcode<@b<package> Ada.Locales @b<is>
+ @b<pragma> Preelaborate(Locales);
+ @b<type> Language_Code @b<is array> (1 .. 3) @b<of> Character @b<range> 'a' .. 'z';
+ @b<type> Country_Code @b<is array> (1 .. 2) @b<of> Character @b<range> 'A' .. 'Z';
+ Language_Unknown : @b<constant> Language_Code := "und";
+ Country_Unknown : @b<constant> Country_Code := "ZZ";
+ @b<function> Language @b<return> Language_Code;
+ @b<function> Country @b<return> Country_Code;
+A @i<locale> identifies a geopolitical place or region, its associated
+character sets, data and time formats, currency formats, and other
+internationalization related characteristics. The active locale is
+the locale associated with the active partition.
+Language_Code is a lower-case string representation of an ISO 639-3
+alpha-3 code that identifies the language associated with the
+Country_Code is an upper-case string representation of an ISO 3166-1
+alpha-2 code that identifies the country associated with the
+If the Country_Code associated with the active locale cannot be
+determined from the environment then Country returns Country_Unknown.
+If the Language_Code associated with the active locale cannot
+be determined from the environment then Language returns Language_Unknown.
ACATS C-Tests are needed to test this package.
@@ -1604,6 +1677,53 @@
The package requires ISO 639-2/T names. Why are the other parts of that standard
referenced in the "Normative References" section? If we're not using them, they
ought not be there. (BTW, I put those references in the required numeric order.)
+From: Brad Moore
+Date: Friday, June 25, 2010 7:05 PM
+> A couple of questions for the next version (*AFTER* the meeting):
+> The package name changed from Locale to Locales in this version.
+> Was that
+Yes, I should have mentioned that as another change, (which actually was the
+name of the original version of the package)
+The reasoning behind that change is that when the package was a child of System,
+it seemed to make more sense to use singular, because it read better, since
+"System" acted as an adjective to describe "Locale". When moved as a child of
+Ada, this no longer was the case. "Ada" does not have a locale. Many of the
+other child packages of Ada are plural as well (Directories, Assertions,
+Containers, etc). Under "Ada", it seems to be a better choice to go with the
+plural form, since "Locales" is more like a subject area, much like "Assertions"
+is a subject area if one wants to go about inserting an assertion in ones code.
+> The package requires ISO 639-2/T names. Why are the other parts of that
+> standard referenced in the "Normative References" section? If we're not
+> using them, they ought not be there. (BTW, I put those references in the
+> required numeric order.)
+I actually had removed 639-1 from my last submission, I see you added it back
+in. I removed 639-1 because that describes alpha-2 codes which we definitely
+I am thinking we should be able to get rid of the 639-2 reference also. The
+639-3 standard is a superset of 639-2. It uses the 639-2/T codes instead of the
+639-2/B codes, when there are two codes for a language in 629-2.
+The 639-3 codes are also alpha-3 codes, as are 639-2 codes.
+639-3 also better deals with certain cases that are problematic in 639-2.
+For example, chinese is a macro language.
+In 629-2/T and 639-3 this appears as the code "zho".
+However, if the current locale is more specificly defined to be Mandarin
+Chinese, 639-3 provides a code "cmn" for this purpose. 639-2 does not break down
+chinese any further than the macro language
Questions? Ask the ACAA Technical Agent