1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
|
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Users_Guide.ent">
%BOOK_ENTITIES;
]>
<appendix id="appe-Users_Guide-Language_codes">
<title>Language codes</title>
<important>
<title>Region subtags</title>
<para>
The only part of the XML language tag that is mandatory in <application>Publican</application> is the <firstterm>language subtag</firstterm>. However, <application>Publican</application> is designed with the assumption that you will routinely include the <firstterm>region subtag</firstterm> when you identify languages. In many languages, spelling and vocabulary vary significantly from region to region. If you do not specify the regional variety of a language in which your document is authored or into which it is translated, you might obtain unexpected results when you build the document in <application>Publican</application>.
</para>
</important>
<important>
<title>Other language codes</title>
<para>
The system of codes used to identify languages in the XML standard is not the only system of languages codes in use in the world today. However, because <application>Publican</application> strives to comply with the XML standard, these are the only codes that <application>Publican</application> supports. In particular, note that the codes used in the GNU tools (identified by their use of underscores and the <literal>@</literal> symbol to separate elements — for example, <literal>en_GB</literal> or <literal>sr_RS@latin</literal>) do not comply with the XML standard and therefore do not work with <application>Publican</application>.
</para>
</important>
<para>
<application>Publican</application> is an XML publication tool and therefore is designed to use the language codes — or <firstterm>tags</firstterm> — that the World Wide Web Consortium (W3C) designated in the XML specification.<footnote> <para>
<ulink url="http://www.w3.org/TR/REC-xml/#sec-lang-tag">http://www.w3.org/TR/REC-xml/#sec-lang-tag</ulink>
</para>
</footnote> These codes are defined in the Internet Engineering Task Force (IETF) document <citetitle>BCP 47: Tags for Identifying Languages</citetitle>.<footnote> <para>
<ulink url="http://tools.ietf.org/html/bcp47">http://tools.ietf.org/html/bcp47</ulink>
</para>
</footnote>
</para>
<para>
Language tags are built from one of more <firstterm>subtags</firstterm>, separated from one another by hyphens. In order of appearance within a language tag, these subtags are:
</para>
<para>
<literal><replaceable>language</replaceable>-<replaceable>script</replaceable>-<replaceable>region</replaceable>-<replaceable>variant</replaceable></literal>
</para>
<para>
BCP 47 also allows for considerable customization of language tags for special purposes through the use of <firstterm>extension subtags</firstterm> and <firstterm>private-use subtags</firstterm>. Extension subtags allow for finer-tuning of existing subtags, but must be registered with the IETF (none are currently registered). Private-use subtags are introduced by <literal>x-</literal> and do not need to be registered. Private-use subtags aside, a subtag is valid if it appears in the registry of subtags maintained by the IETF through the Internet Assigned Numbers Authority (IANA).<footnote> <para>
<ulink url="http://www.iana.org/assignments/language-subtag-registry">http://www.iana.org/assignments/language-subtag-registry</ulink>
</para>
</footnote> Although <application>Publican</application> will accept any language tag that is valid under the rules presented in BCP 47, it is designed around the assumption that language tags for documents will most usually take the form <literal><replaceable>language</replaceable>-<replaceable>region</replaceable></literal>. A brief description of subtags follows:
</para>
<variablelist>
<varlistentry>
<term>language subtag</term>
<listitem>
<para>
The language subtag comprises two or more lower-case letters and is the only mandatory part of the language tag. For most widely spoken languages, the language subtag is a two-letter code identical with the language codes specified in ISO 639-1, <footnote> <para>
<ulink url="http://www.infoterm.info/standardization/iso_639_1_2002.php">http://www.infoterm.info/standardization/iso_639_1_2002.php</ulink>
</para>
</footnote> for example, <literal>zh</literal> (Chinese), <literal>hi</literal> (Hindi), <literal>es</literal> (Spanish), and <literal>en</literal> (English). Where no two-letter code exists in ISO 639-1, the language subtag is usually a three-letter code identical with the codes specified in ISO 639-2,<footnote> <para>
<ulink url="http://www.loc.gov/standards/iso639-2/">http://www.loc.gov/standards/iso639-2/</ulink>
</para>
</footnote> for example, <literal>bal</literal> (Balochi), <literal>apk</literal> (Kiowa Apache), and <literal>tpi</literal> (Tok Pisin). Finally, a small number of language subtags appear in the IANA registry that have no ISO 639-1 or ISO 639-2 equivalent, such as subtags for the constructed languages <literal>qya</literal> (Quenya) and <literal>tlh</literal> (Klingon), and for the occult language <literal>i-enochian</literal> (Enochian). This last example also illustrates a small number of language subtags <firstterm>grandfathered</firstterm> into the registry that do not match the two-letter or three-letter pattern of codes derived from the ISO 639 standards.
</para>
<note>
<title>Extended language subtags</title>
<para>
<citetitle>RFC 5646: Tags for Identifying Languages</citetitle><footnote> <para>
<ulink url="http://tools.ietf.org/html/rfc5646">http://tools.ietf.org/html/rfc5646</ulink>
</para>
</footnote> issued in September 2009 allows for <firstterm>extended language subtags</firstterm> to follow the language subtag. Extended language subtags are three-letter codes that represent languages that share a close relationship with a language already represented by a language subtag. For example, <literal>yue</literal> represents Cantonese, but this subtag must always be used with the language subtag associated with it (Chinese), thus: <literal>zh-yue</literal>. The IETF does not yet recognize RFC 5646 as "Best Common Practice", nor are these subtags part of the XML standard yet.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry>
<term>script subtag</term>
<listitem>
<para>
The script subtag comprises four letters — the first one in upper case, the other three in lower case — and defines a writing system. These codes are identical with the four-letter codes specified in ISO 15924.<footnote> <para>
<ulink url="http://www.unicode.org/iso15924/">http://www.unicode.org/iso15924/</ulink>
</para>
</footnote> The script subtag is used to identify languages that are commonly written with more than one writing system; the subtag is omitted when it adds no distinguishing value to the language tag overall. For example, <literal>sr-Latn</literal> represents Serbian written with the Latin alphabet and <literal>sr-Cyrl</literal> represents Serbian written with the Cyrillic alphabet; <literal>az-Arab</literal> represents Azerbaijani written in Arabic script and <literal>az-Cyrl</literal> represents Azerbaijani written with the Cyrillic alphabet. Conversely, French should not be represented as <literal>fr-Latn</literal>, because French is not commonly written in any script other than the Latin alphabet anywhere in the world.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>region subtag</term>
<listitem>
<para>
The region subtag comprises either two upper-case letters (for regions that conform to national boundaries) or three digits (for other areas, such as trans-national regions). The two-letter subtags are identical with those from ISO 3166-1<footnote> <para>
<ulink url="http://www.iso.org/iso/country_codes.htm">http://www.iso.org/iso/country_codes.htm</ulink>
</para>
</footnote>, for example, <literal>AT</literal> (Austria), <literal>TZ</literal> (Tanzania), and <literal>VE</literal> (Venezuela). The three-digit region subtags are based on those in UN M.49, <footnote> <para>
<ulink url="http://unstats.un.org/unsd/methods/m49/m49.htm">http://unstats.un.org/unsd/methods/m49/m49.htm</ulink>
</para>
</footnote> for example, <literal>015</literal> (Northern Africa), <literal>061</literal> (Polynesia), and <literal>419</literal> (Latin America and the Caribbean).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>variant subtag</term>
<listitem>
<para>
Variant subtags identify well-defined, recognizable variants of a language or script and can include upper-case letters, lower-case letters, and numerals. Variant subtags that start with a letter must be at least five characters long, and those that start with a numeral must be at least four characters long. Most variant subtags can only be used in combination with specific subtags or combinations of subtags. Variant subtags do not harmonize with any other standard; they are each the result of a separate registration with the IETF by an interested person or group.
</para>
<para>
Under the present standard, dialects of several languages are designated with variant subtags, for example, <literal>nedis</literal> denotes Nadiza (also known as Natisone), a dialect of Slovenian. This tag must be used in conjunction with the language subtag for Slovenian, thus: <literal>sl-nedis</literal>. In September 2009, the IETF issued a Request for Comments (RFC) that (amongst other things) proposes that dialects be represented by language extension subtags attached to language subtags.<footnote> <para>
<ulink url="http://tools.ietf.org/html/rfc5646">http://tools.ietf.org/html/rfc5646</ulink>
</para>
</footnote>
</para>
<para>
Most variant subtags mark a particular orthography, most usually as a result of an official spelling reform or a significant work documenting the language. Examples (with their required language subtags) include: <literal>fr-1606nicot</literal> (French as documented by Jean Nicot in 1606), <literal>de-1901</literal> (German spelling codified by the 2nd Orthographic Conference in 1901) and <literal>be-1959acad</literal> (Belarusian as codified by the Orthography Commission in 1959).
</para>
<para>
Finally, some variant subtags denote a particular variant of a system of writing or transliteration. For example, <literal>zh-Latn-wadegile</literal> is Chinese written in the Latin alphabet, according to the transliteration system developed by Thomas Wade and Herbert Giles; <literal>ja-Latn-hepburn</literal> is Japanese written in the Latin alphabet using the transliteration system of James Curtis Hepburn.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
<application>Publican</application> includes support for the following languages:
</para>
<itemizedlist>
<listitem>
<para>
ar-SA — Arabic
</para>
</listitem>
<listitem>
<para>
as-IN — Assamese
</para>
</listitem>
<listitem>
<para>
ast-ES — Asturian
</para>
</listitem>
<listitem>
<para>
bg-BG — Bulgarian
</para>
</listitem>
<listitem>
<para>
bn-IN — Bengali (India)
</para>
</listitem>
<listitem>
<para>
bs-BA — Bosnian
</para>
</listitem>
<listitem>
<para>
ca-ES — Catalan
</para>
</listitem>
<listitem>
<para>
cs-CZ — Czech
</para>
</listitem>
<listitem>
<para>
da-DK — Danish
</para>
</listitem>
<listitem>
<para>
de-CH — German (Switzerland)
</para>
</listitem>
<listitem>
<para>
de-DE — German (Germany)
</para>
</listitem>
<listitem>
<para>
el-GR — Greek
</para>
</listitem>
<listitem>
<para>
es-ES — Spanish
</para>
</listitem>
<listitem>
<para>
fa-IR — Persian
</para>
</listitem>
<listitem>
<para>
fi-FI — Finnish
</para>
</listitem>
<listitem>
<para>
fr-FR — French
</para>
</listitem>
<listitem>
<para>
gu-IN — Gujarati
</para>
</listitem>
<listitem>
<para>
he-IL — Hebrew
</para>
</listitem>
<listitem>
<para>
hi-IN — Hindi
</para>
</listitem>
<listitem>
<para>
hr-HR — Croatian
</para>
</listitem>
<listitem>
<para>
hu-HU — Hungarian
</para>
</listitem>
<listitem>
<para>
id-ID — Indonesian
</para>
</listitem>
<listitem>
<para>
is-IS — Icelandic
</para>
</listitem>
<listitem>
<para>
it-IT — Italian
</para>
</listitem>
<listitem>
<para>
ja-JP — Japanese
</para>
</listitem>
<listitem>
<para>
kn-IN — Kannada
</para>
</listitem>
<listitem>
<para>
ko-KR — Korean
</para>
</listitem>
<listitem>
<para>
lv-LV — Latvian
</para>
</listitem>
<listitem>
<para>
ml-IN — Malayalam
</para>
</listitem>
<listitem>
<para>
mr-IN — Marathi
</para>
</listitem>
<listitem>
<para>
nb-NO — Norwegian (Bokmål orthography)
</para>
</listitem>
<listitem>
<para>
nl-NL — Dutch
</para>
</listitem>
<listitem>
<para>
or-IN — Oriya
</para>
</listitem>
<listitem>
<para>
pa-IN — Punjabi
</para>
</listitem>
<listitem>
<para>
pl-PL — Polish
</para>
</listitem>
<listitem>
<para>
pt-BR — Portuguese (Brazil)
</para>
</listitem>
<listitem>
<para>
pt-PT — Portuguese (Portugal)
</para>
</listitem>
<listitem>
<para>
ru-RU — Russian
</para>
</listitem>
<listitem>
<para>
si-LK — Sinhalese
</para>
</listitem>
<listitem>
<para>
sk-SK — Slovak
</para>
</listitem>
<listitem>
<para>
sr-Cyrl-RS — Serbian (Cyrillic script)
</para>
</listitem>
<listitem>
<para>
sr-Latn-RS — Serbian (Latin script)
</para>
</listitem>
<listitem>
<para>
sv-SE — Swedish
</para>
</listitem>
<listitem>
<para>
ta-IN — Tamil
</para>
</listitem>
<listitem>
<para>
te-IN — Telugu
</para>
</listitem>
<listitem>
<para>
th-TH — Thai
</para>
</listitem>
<listitem>
<para>
uk-UA — Ukrainian
</para>
</listitem>
<listitem>
<para>
zh-CN — Chinese (People's Republic of China, implicitly simplified Han script)
</para>
</listitem>
<listitem>
<para>
zh-TW — Chinese (Republic of China, implicitly traditional Han script)
</para>
</listitem>
</itemizedlist>
</appendix>
|