Locales and Language Codes
A locale can be defined as a targeted sales region; it can also be used to define a specific region within the programming code of a given product, such as software or a web page. A locale is defined by specifying a language and a given country or region. For example, French for France is one locale, and French for Canada is a different locale. German for Austria is one locale and German for Germany is another. There are thousands of combinations you can make in this way.
Use of ISO language and country codes facilitate communication between project team members, using standardized abbreviations when referring to languages.
ISO 639-1 defines two-letter language codes for many languages and can be found at http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.
ISO 3166-1 defines two-letter country and can be found at
http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.
These codes can be used in combination (the standard conventions are used below) to designate a certain locale, or specific region in the world. It is standard to create combinations on the fly, selecting the language code needed, then selecting the region needed, and putting them together in the formats shown below as examples:
fr_FR = French for France
fr_CA = French for Canada
de_AT – German for Austria
de_DE = German for Germany
en_US = English or United States
en_GB = English for Great Britain
Note the standardized use of the underscore and the style of capitalization in the examples: lower case letters to indicate language (ISO 639) followed by underscore followed by upper case letters to indicate the country code (from ISO 3166).
In certain cases, only two-letter language codes are used, but four letter combinations should be used when languages are involved that are spoken in varied locales such as Chinese, where “zh_CN” indicates for Chinese for China (Simplified Chinese) and “zh_TW” indicates Chinese for Taiwan (Traditional Chinese).
Tags: Definitions, L10N, Language, Locale, Localization, Tips
Posted in: Articles
