In Content XML (CXML), you can use the optional @xml:lang
attribute to indicate the language of the text. @xml:lang
applies to all attributes and content of the element where it is specified, unless it is overridden with @xml:lang
on another element within that content.
You can use @xml:lang
with the following elements:
- Content (
<tps:content>
) - Typefi Sections (
<tps:section>
) - Typefi Elements (
<tps:context>
) - Paragraphs (
<tps:p>
) - Character spans (
<tps:c>
) - Soft styles (
<tps:style>
)
The value of @xml:lang
is a string and uses ISO-639 two-letter codes with (optional) ISO-3166 two-letter country codes. ISO-3166 two-letter country codes allow you to specify regional dialects, scripts, and other variants related to that language. Refer to the table below.
For example, a <tps:section>
in German (2006 reform) would look like this in CXML:
@xml:lang
codes are case-sensitive.
Language codes you can use
<tdfr-CA
Language | @xml:lang code |
---|---|
Arabic | ar ar-SA |
Bengali (India) | bn bn-IN |
Bulgarian | bg bg-BG |
Burmese (Myanmar [Burma]) | my my-MM |
Catalan | ca ca-ES |
Chinese: Simplified | zh zh-CN |
Chinese: Traditional | zh-TW |
Chinese: Traditional (Hong Kong SAR of China) | zh-HK |
Croatian | hr hr-HR |
Czech | cs cs-CZ |
Danish | da da-DK |
Dutch: 2005 Reform | nl nl-NL |
English: Canadian | en-CA |
English: UK | en-GB |
English: USA | en en-US |
Estonian | et et-EE |
Finnish | fi fi-FI |
French | fr fr-FR |
French: Canadian | fr-CA |
German: Austria 2006 Reform | de-AT |
German: 2006 Reform | de de-DE |
German: Swiss 2006 Reform | de-CH |
Greek | el el-GR |
Gujarati (India) | gu gu-IN |
Hebrew | he he-IL |
Hindi (India) | hi hi-IN |
Hungarian | hu hu-HU |
Indonesian (Indonesia) | id id-ID |
Italian | it it-IT |
Japanese | ja ja-JP |
Kannada (India) | kn kn-IN |
Khmer (Cambodia) | km km-KH |
Korean | ko ko-KR |
Latvian | lv lv-LV |
Lao (Laos) | lo lo-LA |
Lithuanian | lt lt-LT |
Malayalam (India) | ml ml-IN |
Marathi (India) | mr mr-IN |
Norwegian: Bokmål | nb nb-NO |
Norwegian: Nynorsk | nn nn-NO |
Oriya (India) | or or-IN |
Polish | pl pl-PL |
Portuguese | pt pt-PT |
Portuguese: Orthographic Agreement | pt-BR |
Punjabi (India) | pa pa-IN |
Romanian | ro ro-RO |
Russian | ru ru-RU |
Sinhala (Sri Lanka) | si si-LK |
Slovak | sk sk-SK |
Slovenian | sl sl-SI |
Spanish | es es-ES |
Swedish | sv sv-SE |
Tamil (India) | ta ta-IN |
Telugu (India) | te te-IN |
Thai | th th-TH |
Turkish | tr tr-TR |
Ukrainian | uk uk-UA |
Comments
0 comments
Please sign in to leave a comment.