![]() |
Language ID |
Soluling identifies each language with a language ID. The ID combines a language, a script, a country, and a variant code.
The format of a language ID is:
ll[-Ssss][-CC[-variant]]
| Part | Description | Required |
|---|---|---|
| ll | ISO 639 (Wikipedia) language code. Two or three lower case letters. Most languages have a two-letter code (ISO 639-1). | Yes |
| Ssss | ISO 15924 (Wikipedia) script code. Four letters, the first in upper case. For example, Latn, Cyrl, Hans, and Hant. |
Only when the language does not use its default script |
| CC | ISO 3166 (Wikipedia) country code. Two upper case letters, or a three-digit UN M.49 region code, such as 419 for Latin America. |
No |
| variant | Variant code. If there is a variant but no country, use two hyphens between the language and the variant. For example, de--phoneb. |
No |
The format is based on the IETF language tag (BCP 47, Wikipedia). The variant syntax is Soluling's own and is not part of BCP 47.
| Value | Description | Notes |
|---|---|---|
de |
German | |
de-DE |
German (Germany) | |
de-CH |
German (Switzerland) | |
de--phoneb |
German with phonebook sort order | A variant without a country. |
de-DE-phoneb |
German (Germany) with phonebook sort order | A variant with a country. |
es-419 |
Spanish (Latin America) | The country part is a UN M.49 region code. |
zh |
Simplified Chinese | The script part (Hans) is not needed because the default script of Chinese is Simplified. |
zh-Hans |
Simplified Chinese | The same language as zh, with the script given explicitly. |
zh-CN |
Simplified Chinese (China) | The script part (Hans) is not needed because China uses Simplified Chinese. |
zh-Hant |
Traditional Chinese | The script part (Hant) is needed because the default script of Chinese is Simplified. |
zh-TW |
Traditional Chinese (Taiwan) | The script part (Hant) is not needed because Taiwan uses Traditional Chinese. |
zh-Hant-TW |
Traditional Chinese (Taiwan) | The same language as zh-TW, with the script given explicitly. |
sr-Latn |
Serbian (Latin) | The script part (Latn) is needed because the default script of Serbian is Cyrillic. |
Learn more about languages that need special care.
Soluling uses the above language ID internally. When it reads and writes localized files, or exports files that contain language IDs, the IDs in the files can have a different format. The separator can be "_" instead of "-", the script part can be left out, and the ID can be in all lower case or all upper case.
The XML, TMX, XLIFF, and TBX formats and databases contain language IDs. To configure the format of the IDs, use:
The settings are:
Specifies how to format the language IDs that are written to the file, such as the xml:lang attributes. Possible values are:
| Value | Description |
|---|---|
| Standard: ll[-Ssss][-CC] | Standard language ID that contains an ISO 639 language code (ll), an optional ISO 15924 script code (Ssss), and an optional ISO 3166 country code (CC). For example, sr-Latn-RS. This is the default value. |
| Legacy: ll[-CC] | Legacy language ID that contains an ISO 639 language code (ll) and an optional ISO 3166 country code (CC), but no script code. If the ID uses the secondary script of the language, a country code and, for some languages, a script variant are added. For example, Traditional Chinese is zh-TW, and Serbian (Latin) is sr-RS-LAT. |
| Underline: ll[_CC] | As above, but the separator is an underscore, "_", instead of a hyphen, "-". For example, zh_TW. |
We recommend using the standard language IDs. Use the other formats only if your files are read by a system that requires legacy IDs.
Specifies the character case of the language IDs that are written to the file. Possible values are:
| Value | Description |
|---|---|
| Standard (ll-CC) | The language part is written in lower case, the optional script part is capitalized, and the optional country part is written in upper case. For example, en-US and sr-Latn-RS. This is the default value. |
| Lower (ll-cc) | All parts are written in lower case. For example, en-us and sr-latn-rs. |
| Upper (LL-CC) | All parts are written in upper case. For example, EN-US and SR-LATN-RS. |
Specifies when the script part is included in the language ID. This is visible when the language ID format is Standard. Possible values are:
| Value | Description |
|---|---|
| Standard | The script code is included only if the language does not use its default script. For example, English is en, Simplified Chinese is zh, and Traditional Chinese is zh-Hant. This is the default value. |
| On multiple scripts | The script code is included if the language can use more than one script. For example, English is en, Simplified Chinese is zh-Hans, and Traditional Chinese is zh-Hant. |
| Always | The script code is always included. For example, English is en-Latn, Simplified Chinese is zh-Hans, and Traditional Chinese is zh-Hant. |
Specifies when the country part is included in the language ID of a language that can use more than one script. This is visible when the language ID format is Legacy or Underline. Possible values are:
| Value | Description |
|---|---|
| No | The country code is added only when it is needed to identify the script. For example, English is en, Simplified Chinese is zh, and Traditional Chinese is zh-TW. This is the default value. |
| Yes | The country code is always added if the language can use more than one script. For example, English is en, Simplified Chinese is zh-CN, and Traditional Chinese is zh-TW. |