Home  

Random  

Nearby  



Log in  



Settings  



Donate  



About Wikimedia Commons  

Disclaimers  



Wikimedia Commons





Template:Dir





Language  

Watch  

View source  





ltr

Protected This template has been protected from editing to prevent vandalism.
Please discuss changes on the talk pageorrequest unprotection.
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Dir/doc.

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

Usage

{{Dir |1= |2= |3= }}

Template parameters

 Parameter text is empty
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

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=1or‎useTemplateData=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.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-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

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
language1

The language code

Linerequired
rtl2

Text to return for right-to-left languages (such as Arabic or Hebrew, and others listed in the main description of the template).

Default
rtl
Contentoptional
ltr3

Text to return for left-to-right languages (such as English and all others not listed in the main description of the template).

Default
ltr
Contentoptional

Additional information

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

See also

  • {{Multilingual link}}, creates a link to Wikipedia article in user's unterface language.
  • Localization

    This template is not intended to be localized.

    Example

    {{ Dir{{{ lang| {{int:lang}} }}}rightleft }} will return either "left" or "right" for rtl ot ltr

    {{ Direnrightleft }} returns left, and {{ Dirarrightleft }} returns right



    Retrieved from "https://commons.wikimedia.org/w/index.php?title=Template:Dir&oldid=699751876"
     



    Last edited on 27 October 2022, at 23:32  


    Languages

     


    Acèh
    ि
    العربية

    Azərbaycanca
    Башҡортса
    Basa Bali

    Banjar
    Català
     / Mìng-dĕ̤ng-nḡ
    Cebuano
    کوردی
    Cymraeg
    Dagbanli

    Ελληνικά
    Euskara
    فارسی
    Nordfriisk
    Gaeilge
    Gàidhlig
      / Gõychi Konknni
    Bahasa Hulontalo

    Gungbe
    Gaelg
    Hausa
    ि
    Bahasa Indonesia
    Ilokano

    Jawa
    Taqbaylit

    Lëtzebuergesch
    Madhurâ
    ि
    Мокшень
    Malagasy
    Minangkabau


    Bahasa Melayu

    ି
    Srpskohrvatski / српскохрватски
    Simple English
    Српски / srpski
    Svenska
    Українська
    Vèneto
    Tiếng Vit

     

    Wikimedia Commons


    This page was last edited on 27 October 2022, at 23:32.

    Files are available under licenses specified on their description page. All structured data from the file namespace is available under the Creative Commons CC0 License; all unstructured text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and the Privacy Policy.



    Privacy policy

    About Wikimedia Commons

    Disclaimers

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Terms of Use

    Desktop