Template:Transl/doc

From Historical Hastings

Purpose[edit]

This template is intended to unify all "transliteration" templates, such as {{IAST}} and {{ISOtranslit}}. These templates are still usable, but they just transclude or are redirected back to {{transl}}. For example, (e.g. {{IAST|saṃskṛtam}} is a shortcut for {{transl|sa|IAST|saṃskṛtam}}; others like ArabDIN are handled natively by this template: {{transl|ar|DIN|...}}).

This template is kept separate from {{lang}} to address formatting issues (via css classes) and identification of transliteration schemes used. Ultimately, if these concerns are smartly addressed in the css file and/or in {{lang}}, using {{transl|xx|...}} should be equivalent to using {{lang|xx-Latn|...}}, viz. stating that the string is a Romanization by adding "-Latn" to the language code.[clarification needed]

Usage[edit]

There are two ways of using this template: with or without specifying the transliteration scheme used:

  • two parameters, with ISO 639 language code: {{transl|ar|al-Khwarizmi}} means that "al-Khwarizmi" is a transliteration from the Arabic in a loose or unspecified scheme.
  • two parameters, with ISO 15924 script code: {{transl|Ogam|MAQI}} means that "MAQI" transliterates an Ogham inscription without specifying the language. Potentially useful when writing systems themselves are under discussion, e.g. {{transl|Cyrl|š}}, not {{transl|cu|š}} or {{transl|ru|š}} when discussing the letter Ш.
  • three parameters, with ISO 639 language code: {{transl|ar|DIN|al-Ḫawārizmī}} / {{transl|ar|ALA|al-Khawārizmī}} the second parameter specifies the scheme used (DIN vs. ALA).
  • three parameters, with ISO 15924 script code: {{transl|Arab|DIN|Ḫ}} vs {{transl|Arab|ALA|Kh}} for ﺥ‎.

To suppress the default italicization of Latin scripts, add |italic=no. This parameter is useful for proper nouns, for example.

Examples[edit]

code:

  • {{transl|ar|[[al-Khwarizmi]]}} / [[DIN 31635]]: {{transl|ar|DIN|al-Ḫawārizmī}} / [[ISO 233]]: {{transl|ar|ISO|al-H̱awārizmī}} / [[ALA-LC Romanization|ALA]]: {{transl|ar|ALA|al-Khawārizmī}}
  • [[Royal Thai General System of Transcription|RTGS]]: {{transl|th|phasa thai}} / [[ISO 11940]]: {{transl|th|ISO|p̣hās̄ʹāthịy}}
  • {{cuneiform|[[Sumerian language|𒅴𒂠]]}} {{transl|sux|EME.GIR<sub>15</sub>}} / {{cuneiform|6|[[Hittite language|𒉈𒅆𒇷]]}} {{transl|hit|''ne-ši-li''}}

result:

  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. / DIN 31635: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. / ISO 233: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. / ALA: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
  • RTGS: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. / ISO 11940: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
  • Template:Cuneiform Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. / Template:Cuneiform Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.

ISO:

  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. {{transl|ru|ISO|russkij}}: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. {{transl|ab|ISO|aṗsua}}: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. {{transl|ar|ISO|ʿarabī}}: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
    ISO has huge issues transliterating alif, so it's better to use the Library of Congress transliteration, the German Institute for Standardization or Hans Wehr transliteration; see Arabic transliteration
  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. {{transl|ta|ISO|tamiḻ}}: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. {{transl|bn|ISO|baṅla}}: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. {{transl|el|ISO|ellēniká}}: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. {{transl|ka|ISO|k'art'uli}}: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. {{transl|zh|ISO|hànyǔ pīnyīn}}: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.
  • Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found. {{transl|th|ISO|p̣hās̄ʹāthịy}}: Lua error in package.lua at line 80: module 'Module:Language/data/iana languages' not found.

CSS[edit]

In order to apply a style to all text marked as transliteration, use a CSS selector that chooses all text with transliteration in the title attribute (tooltip). For instance, if you add the following to your common.css, all transliterations will be colored teal:

[title~=transliteratioHatnote{ color: teal; }

Tracking categories[edit]

See also[edit]