Template:Transliteration/doc

From MicroWiki, the free micronational encyclopædia
Jump to navigation Jump to search

Template:Language templates

This template is used to mark up text transliterated or romanised from a non-Latin alphabet script to Latin alphabet script.

This template should only be used for the transliterations of non-Latin scripts; for non-English language text displayed in its native script (such as Greek, Cyrillic and Arabic), {{lang}} should be used, which tags non-transliterated text (written in original script). Transl often used alongside that template, to allow non-readers of the script to interpret the text.

This template adds a tooltip label naming the transliteration scheme, and renders text in italics by default. This template is important for MOS:ACCESSIBILITY, as it invisibly tags text with the correct language, allowing for screenreaders to the correct style of pronunciation.

It also displays text in an appropriate font; romanisations marked up in {{lang}} may display in fonts designed for that language's native text, whereas the transl template displays text in the same font as the rest of the article.

Some languages, such as Chinese, have more than one style of transliteration (such as Wade-Giles, pinyin, etc). This template can be used for these different transliteration schemes, though Wikipedia has a number of language-specific templates, some of which support more than one transliteration styles in their parameters, that may be better suited for marking up transliterations.

Example

The following code tags a Ukrainian name and its transliteration according to the Ukrainian National scheme.

Markup Renders as
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"|
[markup]
style= "background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"|

[rendering]

Rationale

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

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 ШTemplate:Script/doc/id-unk.
  • 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 Template:Script/Arabic.

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

Note that the language code is ISO 639, not the IETF BCP 47 language tags that allow variants.

Transliteration scheme codes

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

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:

ISO:

CSS

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

TemplateData

Template:Templatedata header

Marks a text span transliterated from a particular language or writing system, and, optionally, according to a specific transliteration system.

Template parameters

ParameterDescriptionTypeStatus
Language or script code1

ISO 639 language code (e.g., uk) or ISO 15924 script code (e.g., Cyrl)

Linerequired
Text or transliteration scheme2

Source text to be transliterated, or, optionally, transliteration scheme (e.g., bgn/pcgn)

Stringrequired
Text3

Source text to be transliterated (required if a transliteration scheme is entered above)

Stringsuggested

See also

Template:ISO 15924 script codes and related Unicode data