Windows Language Code Identifier (LCID) Reference s1

[MS-LCID]:

Windows Language Code Identifier (LCID) Reference

Intellectual Property Rights Notice for Open Specifications Documentation

§  Technical Documentation. Microsoft publishes Open Specifications documentation (“this documentation”) for protocols, file formats, data portability, computer languages, and standards support. Additionally, overview documents cover inter-protocol relationships and interactions.

§  Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you can make copies of it in order to develop implementations of the technologies that are described in this documentation and can distribute portions of it in your implementations that use these technologies or in your documentation as necessary to properly document the implementation. You can also distribute in your implementation, with or without modification, any schemas, IDLs, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications documentation.

§  No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

§  Patents. Microsoft has patents that might cover your implementations of the technologies described in the Open Specifications documentation. Neither this notice nor Microsoft's delivery of this documentation grants any licenses under those patents or any other Microsoft patents. However, a given Open Specifications document might be covered by the Microsoft Open Specifications Promise or the Microsoft Community Promise. If you would prefer a written license, or if the technologies described in this documentation are not covered by the Open Specifications Promise or Community Promise, as applicable, patent licenses are available by contacting .

§  Trademarks. The names of companies and products contained in this documentation might be covered by trademarks or similar intellectual property rights. This notice does not grant any licenses under those rights. For a list of Microsoft trademarks, visit www.microsoft.com/trademarks.

§  Fictitious Names. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events that are depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred.

Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than as specifically described above, whether by implication, estoppel, or otherwise.

Tools. The Open Specifications documentation does not require the use of Microsoft programming tools or programming environments in order for you to develop an implementation. If you have access to Microsoft programming tools and environments, you are free to take advantage of them. Certain Open Specifications documents are intended for use in conjunction with publicly available standards specifications and network programming art and, as such, assume that the reader either is familiar with the aforementioned material or has immediate access to it.

Revision Summary

Date / Revision History / Revision Class / Comments /
2/14/2008 / 2.1.3 / Editorial / Changed language and formatting in the technical content.
3/14/2008 / 2.1.4 / Editorial / Changed language and formatting in the technical content.
6/20/2008 / 2.1.5 / Editorial / Changed language and formatting in the technical content.
7/25/2008 / 2.1.6 / Editorial / Changed language and formatting in the technical content.
8/29/2008 / 2.2 / Minor / Clarified the meaning of the technical content.
10/24/2008 / 2.2.1 / Editorial / Changed language and formatting in the technical content.
12/5/2008 / 2.3 / Minor / Clarified the meaning of the technical content.
1/16/2009 / 2.3.1 / Editorial / Changed language and formatting in the technical content.
2/27/2009 / 2.3.2 / Editorial / Changed language and formatting in the technical content.
4/10/2009 / 2.4 / Minor / Clarified the meaning of the technical content.
5/22/2009 / 2.4.1 / Editorial / Changed language and formatting in the technical content.
7/2/2009 / 2.4.2 / Editorial / Changed language and formatting in the technical content.
8/14/2009 / 2.4.3 / Editorial / Changed language and formatting in the technical content.
9/25/2009 / 3.0 / Major / Updated and revised the technical content.
11/6/2009 / 3.0.1 / Editorial / Changed language and formatting in the technical content.
12/18/2009 / 3.0.2 / Editorial / Changed language and formatting in the technical content.
1/29/2010 / 3.1 / Minor / Clarified the meaning of the technical content.
3/12/2010 / 3.1.1 / Editorial / Changed language and formatting in the technical content.
4/23/2010 / 3.1.2 / Editorial / Changed language and formatting in the technical content.
6/4/2010 / 3.1.3 / Editorial / Changed language and formatting in the technical content.
7/16/2010 / 3.1.3 / None / No changes to the meaning, language, or formatting of the technical content.
8/27/2010 / 3.1.3 / None / No changes to the meaning, language, or formatting of the technical content.
10/8/2010 / 3.1.3 / None / No changes to the meaning, language, or formatting of the technical content.
11/19/2010 / 3.1.3 / None / No changes to the meaning, language, or formatting of the technical content.
1/7/2011 / 3.1.3 / None / No changes to the meaning, language, or formatting of the technical content.
2/11/2011 / 3.1.3 / None / No changes to the meaning, language, or formatting of the technical content.
3/25/2011 / 3.1.3 / None / No changes to the meaning, language, or formatting of the technical content.
5/6/2011 / 3.1.3 / None / No changes to the meaning, language, or formatting of the technical content.
6/17/2011 / 3.2 / Minor / Clarified the meaning of the technical content.
9/23/2011 / 3.2 / None / No changes to the meaning, language, or formatting of the technical content.
12/16/2011 / 4.0 / Major / Updated and revised the technical content.
3/30/2012 / 4.0 / None / No changes to the meaning, language, or formatting of the technical content.
7/12/2012 / 5.0 / Major / Updated and revised the technical content.
10/25/2012 / 5.0 / None / No changes to the meaning, language, or formatting of the technical content.
1/31/2013 / 5.0 / None / No changes to the meaning, language, or formatting of the technical content.
8/8/2013 / 6.0 / Major / Updated and revised the technical content.
11/14/2013 / 6.1 / Minor / Clarified the meaning of the technical content.
2/13/2014 / 6.1 / None / No changes to the meaning, language, or formatting of the technical content.
5/15/2014 / 6.1 / None / No changes to the meaning, language, or formatting of the technical content.
6/30/2015 / 7.0 / Major / Significantly changed the technical content.
10/16/2015 / 7.0 / None / No changes to the meaning, language, or formatting of the technical content.
7/14/2016 / 8.0 / Major / Significantly changed the technical content.
3/16/2017 / 9.0 / Major / Significantly changed the technical content.

Table of Contents

1 Introduction 5

1.1 Glossary 5

1.2 References 6

1.2.1 Normative References 6

1.2.2 Informative References 6

1.3 Overview 6

1.4 Relationship to Protocols and Other Structures 7

1.5 Applicability Statement 7

1.6 Versioning and Localization 7

1.7 Vendor-Extensible Fields 7

2 Structures 8

2.1 Language Code Identifiers 8

2.2 LCID Structure 8

2.2.1 Locale Names without LCIDs 24

3 Structure Examples 38

4 Security Considerations 39

5 Appendix A: Product Behavior 40

6 Change Tracking 69

7 Index 70

1  Introduction

This document provides an overview of language code identifiers (LCIDs), also known as culture identifiers, which are being deprecated, and the preferred alternate system of locale codes, which specify a set of locale identifiers that designate culture-specific information such as how text is sorted, how a date is formatted, and the display format for numbers and currency.

Sections 1.7 and 2 of this specification are normative. All other sections and examples in this specification are informative.

1.1  Glossary

This document uses the following terms:

alternate sort: Specifies an alternate collation for a language that has multiple methods for sorting data. For example, German has both "Dictionary" and "Phone Book" sorts. "Dictionary" sorting (de-DE) is the default for German, but developers can specify the alternate "Phone Book" sort (de-DE_phoneb) explicitly.

Chinese BIG5 order: Ideographs are ordered according to the code point values of the Taiwanese BIG5 industrial standard.

Chinese radical/stroke order: Ideographs are ordered according to radical stroke count.

Chinese Unicode order: Deprecated. Identical to the default sort information used for English.

Georgian modern order: An order for the Georgian language that places archaic characters that are no longer used at the end of the alphabet.

Georgian traditional order: An order for the Georgian language that intersperses archaic characters that are no longer used among the rest of the alphabet in their traditional places.

German phone book order: An order that equates Ä, Ö, and Ü with AE, OE, and UE, respectively (commonly used in German phone books).

Hungarian default order: The typical expected alphabetical order for the Hungarian language.

Hungarian technical order: A sort order that places capital letters before lowercase ones, unlike most sorts, which sort lowercase first.

Japanese radical/stroke sort order: Ideographs are ordered by their radical and stroke components, much like an ideographic dictionary might do.

Japanese Unicode order: Deprecated. Identical to the default sort information used for English, except that the backslash (\) is equal to the currency symbol, 0x00A5, the yen sign.

Japanese XJIS order: Ideographs are ordered according to the code point values of the [JIS X 208] and [JIS X 212] government standards.

Korean KSC order: Ideographs are ordered according to the Korean Hangul pronunciation, as specified in the Korean [KSC5601] government standard.

Korean Unicode order: Deprecated. Identical to the default sort information used for English, except that the backslash (\) is equal to the currency symbol, 0x20A9, the won sign.

neutral locale: A locale describing a language without any region-specific information.

PRC Chinese phonetic order: Ideographs are ordered according to their A to Z pronunciation order.

PRC Chinese stroke count order: Ideographs are ordered according to their stroke count.

specific locale: A locale describing a language that has a qualifying regional variant. For example, variants for English can be en-US or en-GB.

Traditional Chinese Bopomofo order: Ideographs are ordered by their most common Mandarin pronunciation, using the Chinese Bopomofo order of the pronunciations.

MAY, SHOULD, MUST, SHOULD NOT, MUST NOT: These terms (in all caps) are used as defined in [RFC2119]. All statements of optional behavior use either MAY, SHOULD, or SHOULD NOT.

1.2  References

Links to a document in the Microsoft Open Specifications library point to the correct section in the most recently published version of the referenced document. However, because individual documents in the library are not updated at the same time, the section numbers in the documents may not match. You can confirm the correct section numbering by checking the Errata.

1.2.1  Normative References

We conduct frequent surveys of the normative references to assure their continued availability. If you have any issue with finding a normative reference, please contact . We will assist you in finding the relevant information.

[ISO-15924] International Organization for Standardization, "ISO 15924 Registration Authority", http://www.unicode.org/iso15924/

[ISO-3166] International Organization for Standardization, "Codes for the representation of names of countries and their subdivisions -- Part1: Country codes", ISO 3166-1:2013, November 2013, http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=63545

Note There is a charge to download the specification.

[ISO-639] International Organization for Standardization, "Codes for the representation of names of languages -- Part 2: Alpha-3 code", ISO 639-2:1998, http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=4767

Note There is a charge to download this specification.

[MS-DTYP] Microsoft Corporation, "Windows Data Types".

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997, http://www.rfc-editor.org/rfc/rfc2119.txt

[RFC5646] Phillips, A, and Davis, M., "Tags for Identifying Languages", BCP 47, RFC 4646, September 2006, http://www.rfc-editor.org/rfc/bcp/bcp47.txt

1.2.2  Informative References

[KSC5601] Korea Industrial Standards Association, "Code for Information Interchange (Hangul and Hanja)", Korean Industrial Standard, 1987, Ref. No. KS C 5601-1987.

1.3  Overview

The LCID structure is used to identify specific languages for the purpose of customizing software for particular languages and cultures. For example, it can specify the way dates, times, and numbers are formatted as strings. It can also specify paper sizes and preferred sort order based on language elements.

LCIDs are being deprecated, and implementers are strongly encouraged to use locale names instead. LCIDs can be used for backward compatibility, but as noted in section 2.2.1, there is no guarantee of LCID uniqueness when used with valid locale names not otherwise associated with an LCID.

1.4  Relationship to Protocols and Other Structures

This structure is related to protocols and structures that need to make special cases for specific languages and cultures.

1.5  Applicability Statement

This structure applies in scenarios where special cases need to be made for specific languages and cultures.

1.6  Versioning and Localization

This structure serves to identify particular languages, locales, and cultures.

1.7  Vendor-Extensible Fields

None.

2  Structures

2.1  Language Code Identifiers

LCIDs are identifiers used to specify localizable information. They are also known as culture identifiers in the Microsoft .NET Framework environment.

The name of a culture consists of its [ISO-639] language code, its [ISO-3166] country/region code, and an optional [ISO-15924] script tag for the written language. For example, the name of the culture in which the language is Bosnian (as written in Latin script and used in the Bosnia and Herzegovina region) is bs-Latn-BA.<1<2<3>

2.2  LCID Structure

This protocol references commonly used data types as defined in [MS-DTYP].

An LCID is a 4-byte value. The value supplied in an LCID is a standard numeric substitution for the international [RFC5646] string.

The following diagram is shown in host byte order.

0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 1
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 2
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 3
0 / 1
Reserved / Sort ID / Language ID

Reserved (12 bits): This field is reserved for future use. It MUST be 0.

Sort ID (4 bits): The sort order. In most cases, this value can be 0x0, which indicates a default sort (SORT_DEFAULT). However, other values can be used when an alternate sort is required. These alternate values are listed in the following table. For example, 0x0407 (German - Germany) becomes 0x10407 when SORT_GERMAN_PHONE_BOOK is used.