Template:Transl
example
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 work like {{Lang|xx-Latn|...}}
(stating that the string is a romanization, by appending the "Latn" script code to the language code when the language can be written in multiple scripts which need their specific styles).
Usage
[edit]There are two ways of using this template: with or without specifying the transliteration scheme used:
- two parameters, with an 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 an 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 an 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 an script code:
{{Transl|Arab|DIN|Ḫ}} vs {{Transl|Arab|ALA|Kh}}
for ﺥ.
Examples
[edit]This code:
{{Transl|ar|[[w:en:al-Khwarizmi|al-Khwarizmi]]}} / [[w:en:DIN 31635|DIN 31635]]: {{Transl|ar|DIN|al-Ḫawārizmī}} / [[w:en:ISO 233|ISO 233]]: {{Transl|ar|ISO|al-H̱awārizmī}} / [[w:en:ALA-LC Romanization|ALA-LC]]: {{Transl|ar|ALA-LC|al-Khawārizmī}}
[[w:en:Royal Thai General System of Transcription|RTGS]]: {{Transl|th|phasa thai}} / [[w:en:ISO 11940|ISO 11940]]: {{Transl|th|ISO|p̣hās̄ʹāthịy}}
[[w:en:Sumerian language|Sumerian language]]: 𒅴𒂠 ({{Transl|sux|EME.GIR<sub>15</sub>}})
[[w:en:Hittite language|Hittite language]]: 𒉈𒅆𒇷 ({{Transl|hit|''ne-ši-li''}})
results in:
- al-Khwarizmi / DIN 31635: al-Ḫawārizmī / ISO 233: al-H̱awārizmī / ALA-LC: al-Khawārizmī
- RTGS: phasa thai / ISO 11940: p̣hās̄ʹāthịy
- Sumerian language: 𒅴𒂠 (EME.GIR15)
- Hittite language: 𒉈𒅆𒇷 (ne-ši-li)
ISO transliterations:
- ab (аԥсшәа):
{{Transl|ab|ISO|aṗsua}}
– aṗsua - ar (العربية):
{{Transl|ar|ISO|ʿarabī}}
– ʿarabī- ISO has huge issues transliterating ʿalif, so it's better to use the Library of Congress (LC-ALA) romanization, the German DIN 31635 transliteration or the Hans Wehr transliteration; see Romanization of Arabic (on English Wikipedia).
- bn (বাংলা):
{{Transl|bn|ISO|baṅla}}
– baṅla - el (Ελληνικά):
{{Transl|el|ISO|ellēniká}}
– ellēniká - ka (ქართული):
{{Transl|ka|ISO|k'art'uli}}
– k'art'uli - ru (русский):
{{Transl|ru|ISO|russkij}}
– russkij - ta (தமிழ்):
{{Transl|ta|ISO|tamiḻ}}
– tamiḻ - th (ไทย):
{{Transl|th|ISO|p̣hās̄ʹāthịy}}
– p̣hās̄ʹāthịy - zh (中文):
{{Transl|zh|ISO|hànyǔ pīnyīn}}
– hànyǔ pīnyīn
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 class attribute. For instance, if you add the following to your common.css, all transliterations will be colored :
.transliteration { color: teal; }
For this to work, the CSS selector previously required the English text transliteration
to be contained at end of the title attribute (tooltip), but this did not work correctly when this English title contained another word or was translated, or when the transliteration mode was undetermined and there was no suitable title given in that case). Using a class selector is more reliable, simple in the CSS syntax, and in fact more performant in browsers (as it matches class exactly without needing complexe parsing of text values).
See also
[edit]- {{Lang}}
- {{Script}}
- Romanization (on English Wikipedia)
- List of ISO transliterations (on English Wikipedia)