Template:Language with name and transliteration/doc: Difference between revisions
Appearance
| [checked revision] | [checked revision] |
Content deleted Content added
Caleb Cooper (talk | contribs) Created page with "{{Documentation subpage}} <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> ==Usage== Transcluded by "lang-xx" templates. Do not use directly. <pre>{{Language with name a..." |
Caleb Cooper (talk | contribs) |
||
| Line 17: | Line 17: | ||
==Right-to-left== |
==Right-to-left== |
||
For languages written right-to-left, like Arabic, Hebrew and [[Script (Unicode)|other]], it is advised to set {{para|rtl|<nowiki>{{rtl}}</nowiki>}} in the language template (lang-ar, lang-he). |
For languages written right-to-left, like Arabic, Hebrew and [[Wikipedia:Script (Unicode)|other]], it is advised to set {{para|rtl|<nowiki>{{rtl}}</nowiki>}} in the language template (lang-ar, lang-he). |
||
This adds the character {{unichar|200f|RIGHT-TO-LEFT MARK|html=}} to the end of the string (the righthand side, in memory). It is an invisible formatting character, that ''terminates'' the R-to-L text. After this, (that is, directly after & outside of the template), all following text is initiated to be left-to-right (English) again. |
This adds the character {{unichar|200f|RIGHT-TO-LEFT MARK|html=}} to the end of the string (the righthand side, in memory). It is an invisible formatting character, that ''terminates'' the R-to-L text. After this, (that is, directly after & outside of the template), all following text is initiated to be left-to-right (English) again. |
||
Revision as of 09:02, 26 October 2020
Usage
Transcluded by "lang-xx" templates. Do not use directly.
{{Language with name and transliteration
| 1 = <!-- language code -->
| 2 = <!-- language name -->
| 3 = <!-- text input -->
| translit = <!-- also |4= -->
| lit = <!-- also |5=; literal translation -->
| script = <!-- overrides |2= in [[Romanization of <script>]] -->
| link = <!-- also |links=; whether to wikilink the language name -->
| rtl = <!-- see below -->
}}
Right-to-left
For languages written right-to-left, like Arabic, Hebrew and other, it is advised to set |rtl={{rtl}} in the language template (lang-ar, lang-he).
This adds the character U+200F RIGHT-TO-LEFT MARK (HTML ‏ · ‏) to the end of the string (the righthand side, in memory). It is an invisible formatting character, that terminates the R-to-L text. After this, (that is, directly after & outside of the template), all following text is initiated to be left-to-right (English) again.
See also
- Template:Language with name
- Template:Language with name and alternate script
- Template:ISO 15924 script codes and Unicode - lists all R-to-L scripts available in Unicode.