Template:Dir: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
m adding more RTL languages per talk page
mNo edit summary
Line 1: Line 1:
{{#switch:{{{1}}}|ar|arc|arz|ckb|dv|fa|fa-af|glk|ha|he|ks|mzn|pnb|prd|ps|sd|ur|yi=rtl|ltr}}<noinclude>
{{#switch:{{{1|{{int:lang}}}}}|ar|arc|arz|bcc|ckb|dv|fa|fa-af|glk|ha|he|ks|mzn|pnb|prd|ps|sd|ug|ur|yi=rtl|ltr}}<noinclude>{{documentation}}</noinclude>


----
Outputs "<tt>rtl</tt>" for right-to-left languages else "<tt>ltr</tt>".

'''{{int:usage}}:''' <nowiki>{{</nowiki>dir|''language_code''}}

Currently it recognizes the following rtl languages:
:'''ar · arc · dv · fa · fa-af · glk · ha · he · ks · mzn · prd · ps · sd · ur · yi'''

[[Category:Internationalization templates|{{PAGENAME}}]]
[[Category:Function templates|{{PAGENAME}}]]
</noinclude>

Revision as of 10:44, 20 November 2011

ltr

[edit] [⧼code-rev-purge-link⧽] Template documentation

Template which returns if the given language is ltr or rtl

e.g.

  • {{dir|en}} → ltr
  • {{dir|fr}} → ltr
  • {{dir|he}} → rtl
The above documentation is transcluded from Template:Dir/doc. (edit | history)
Editors can experiment in this template's sandbox (create) and testcases (create) pages.
Please add categories and interwikis to the /doc subpage. Subpages of this template.