Language Tags and Codes
Language codes are closely related to the localizing process, as they indicate the locales involved in the translation and adaptation of the product. They are used in various contexts; for example, they might be informally used in a document published by the European Union, or they might be introduced in HTML elementging under the lang attribute. In the case of the European Union style guide, the language tags are based on the ISO 639-1 alpha-2 code; in HTML, the language codes are generally defined by the Internet Engineering Task Force's Best Current Practice (BCP) 47. The decision to use one type of code or tag versus another depends upon the nature of the project, and any requirements set out for the localization specialist.
Most frequently, there is a primary sub-code that identifies the language (e.g., "en") and an optional sub-code, in capital letters, that specifies the national variety (e.g., "GB" or "US"). The sub-codes are typically linked with a hyphen, though in some contexts it's necessary to substitute this with an underscore.
There are multiple language tag systems available for language codification. For example, the International Organization for Standardization (ISO) specifies both two- and three-letter codes to represent languages in standards ISO 639-1 and ISO 639-2, respectively.
Language family | ISO 639-1 code | Language variant |
---|---|---|
English | en-GB | British English |
en-US | American English | |
en-CA | Canadian English | |
Spanish | es-ES | Castilian Spanish (as written and spoken in Spain) |
es-MX | Mexican Spanish | |
es-AR | Argentine Spanish | |
es-CO | Colombian Spanish | |
Portuguese | pt-PT | European Portuguese (as written and spoken in Portugal) |
pt-BR | Brazilian Portuguese | |
Chinese | zh-CN | Mainland China, simplified characters |
zh-TW | Taiwan, traditional characters | |
zh-HK | Hong Kong, traditional characters |
Read more about this topic: Language Localisation
Famous quotes containing the words language, tags and/or codes:
“Theres language in her eye, her cheek, her lip,
Nay, her foot speaks; her wanton spirits look out
At every joint and motive of her body.”
—William Shakespeare (15641616)
“So much for Mrs. Hollis nine months of pain and 20 years of hope.”
—Alvah Bessie, Ranald MacDougall, and Lester Cole. Raoul Walsh. Nameless GI, Objective Burma, cutting dog tags off a dead GI (1945)
“We must trust infinitely to the beneficent necessity which shines through all laws. Human nature expresses itself in them as characteristically as in statues, or songs, or railroads, and an abstract of the codes of nations would be an abstract of the common conscience.”
—Ralph Waldo Emerson (18031882)