ltr
![]() |
This template has been protected from editing to prevent vandalism. Please discuss changes on the talk pageorrequest unprotection. |
Note: This template is used on a great lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum. Please discuss proposed changes on the talk page first.
Afterwards, changes can initially be done at and tested with Template:Dir/sandbox.
|
Outputs "rtl" for right-to-left languages, else "ltr". Currently it recognizes the following rtl languages:
{{Dir |1= |2= |3= }}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.
Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1
oruseTemplateData=only
on the /doc
subpage and transcluding it with {{Documentation}} into the template. <nowiki>
-tags can be wrapped around the arguments, if required, to avoid templates being expanded.
Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>
-tags into the Wikitext of the template, as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information
Outputs "rtl" for right-to-left languages, else "ltr". Currently it recognizes the following rtl languages: aaf-arab · aao · abh · abq-arab · abv · ace-arab · acm · acq · acw · acx · acy-arab · adf · ady-arab · aeb · aeb-arab · aec · afb · aic · ajp · apc · apd · ar · ara · arb · arc · arq · ars · ary · arz · auz · avl · ayh · ayl · ayn · ayp · az-arab · azb · bal · bbz · bcc · bej-arab · ber-arab · bft · bgn · bgp · bjm · bjn-arab · bms-arab · bqi · bqp · brh-arab · bsk · cja-arab · cjm-arab · ckb · ckb-arab · crh-arab · deh · dgo-arab · dng-arab · doi-arab · dv · dyu-arab · en-rtl · fa · fa-af · ff-arab · ffm-arab · fub-arab · fuc-arab · fuf-arab · fuh-arab · fui-arab · fuv-arab · gbz-arab · gda · gju-arab · glk · gwc · ha-arab · hac · haz · he · hnd · hno · jat · kbd-arab · kbl-arab · kby-arab · kcn · kfr · khw · kk-arab · kk-cn · kls-arab · kmr-arab · knc-arab · kr-arab · krt-arab · ks · ks-arab · ktl · ku-arab · ky-arab · lad-hebr · lah · lki · lrc · lrk · luz · mad-arab · man-arab · mge-arab · mhj · mki-arab · mne-arab · mnk-arab · mrt-arab · ms-arab · mve · mvy · mwr-arab · mzb · mzn · nqo · ota · pa-arab · pbt · pbu · pga · phl · phn · phr · phv · pnb · prd · prs · ps · pst · raj-arab · rif-arab · rmt-arab · scl · sd · sdb · sdf · sdh · shi-arab · shu · shy-arab · skr · skr-arab · sqr · ssh · su-arab · sw-arab · swh · tg-arab · tig-arab · tk-arab · tly · tly-arab · trw · tt-arab · txj-arab · ug · ug-arab · ur · uz-arab · uzs · wbl · wlc-arab · wne · wni-arab · wo-arab · xhe · xng-arab · xpu · ydd · ydg · yhd · yhd-arab · yhd-hebr · yi · yih · zdj-arab
Parameter | Description | Type | Status | |
---|---|---|---|---|
language | 1 | The language code | Line | required |
rtl | 2 | Text to return for right-to-left languages (such as Arabic or Hebrew, and others listed in the main description of the template).
| Content | optional |
ltr | 3 | Text to return for left-to-right languages (such as English and all others not listed in the main description of the template).
| Content | optional |
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: all users
This template is not intended to be localized.
{{ Dir | {{{ lang| {{int:lang}} }}} | right | left }} will return either "left" or "right" for rtl ot ltr
{{ Dir | en | right | left }} returns left, and {{ Dir | ar | right | left }} returns right