Templat:Transl

Daripada Wikipedia, ensiklopedia bebas.
Jump to navigation Jump to search
Pendokumenan templat[lihat] [sunting] [sejarah] [nyahcache]

Purpose[sunting sumber]

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.[Penjelasan diperlukan]

Usage[sunting sumber]

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.

Transliteration scheme codes[sunting sumber]

Codes for supported transliteration schemes can be seen by viewing the source of Module:Lang/data — the translit_title_table data-structure lists for each such code the corresponding transliteration schemes. These may vary by language — e.g. code "ISO" means scheme ISO 233 for Arabic but ISO 11940 for Thai.

Examples[sunting sumber]

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:

  • [al-Khwarizmi] error: {{transl}}: unrecognized language / script code: ar (bantuan) / DIN 31635: [al-Ḫawārizmī] error: {{transl}}: unrecognized language / script code: ar (bantuan) / ISO 233: [al-H̱awārizmī] error: {{transl}}: unrecognized language / script code: ar (bantuan) / ALA: [al-Khawārizmī] error: {{transl}}: unrecognized language / script code: ar (bantuan)
  • RTGS: [phasa thai] error: {{transl}}: unrecognized language / script code: th (bantuan) / ISO 11940: [p̣hās̄ʹāthịy] error: {{transl}}: unrecognized language / script code: th (bantuan)
  • 𒅴𒂠 EME.GIR15 / 𒉈𒅆𒇷 ne-ši-li

ISO:

  • Ralat Lua pada baris 853 di Modul:Lang: Tried to read nil global template. {{transl|ru|ISO|russkij}}: [russkij] error: {{transl}}: unrecognized language / script code: ru (bantuan)
  • Аҧсуа {{transl|ab|ISO|aṗsua}}: aṗsua
  • Ralat Lua pada baris 853 di Modul:Lang: Tried to read nil global template. {{transl|ar|ISO|ʿarabī}}: [ʿarabī] error: {{transl}}: unrecognized language / script code: ar (bantuan)
    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 and MOS:APOSTROPHE
  • Ralat Lua pada baris 853 di Modul:Lang: Tried to read nil global template. {{transl|ta|ISO|tamiḻ}}: [tamiḻ] error: {{transl}}: unrecognized language / script code: ta (bantuan)
  • Ralat Lua pada baris 853 di Modul:Lang: Tried to read nil global template. {{transl|bn|ISO|baṅla}}: [baṅla] error: {{transl}}: unrecognized language / script code: bn (bantuan)
  • ελληνικά {{transl|el|ISO|ellēniká}}: ellēniká
  • Ralat Lua pada baris 853 di Modul:Lang: Tried to read nil global template. {{transl|ka|ISO|k'art'uli}}: [k'art'uli] error: {{transl}}: unrecognized language / script code: ka (bantuan)
  • Ralat Lua pada baris 853 di Modul:Lang: Tried to read nil global template. {{transl|zh|ISO|hànyǔ pīnyīn}}: [hànyǔ pīnyīn] error: {{transl}}: unrecognized language / script code: zh (bantuan)
  • Ralat Lua pada baris 853 di Modul:Lang: Tried to read nil global template. {{transl|th|ISO|p̣hās̄ʹāthịy}}: [p̣hās̄ʹāthịy] error: {{transl}}: unrecognized language / script code: th (bantuan)

CSS[sunting sumber]

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~=transliteration] { color: teal; }

Tracking category[sunting sumber]

See also[sunting sumber]