Difference between revisions of "Template:Dir"

From WPRDC Wiki
Jump to navigation Jump to search
>Rocket000
(Created page with '{{#switch:{{{1}}}|ar|arc|dv|fa|fa-af|glk|ha|he|ks|ku|mzn|prd|ps|sd|ur|yi=rtl|ltr}}<noinclude> ---- Outputs "<tt>rtl</tt>" for right-to-left languages else "<tt>l...')
 
>Shirayuki
(properly test rtl/ltr parameters when they are effectively set per translatewiki:Template:Dir)
 
(41 intermediate revisions by 25 users not shown)
Line 1: Line 1:
{{#switch:{{{1}}}|ar|arc|dv|fa|fa-af|glk|ha|he|ks|ku|mzn|prd|ps|sd|ur|yi=rtl|ltr}}<noinclude>
{{#switch:{{lc:{{#if:{{{lang|}}}|{{{lang|}}}|{{#if:{{{1|}}}|{{{1|}}}|{{int:lang}}}}}}}}
 
|aeb|aeb-arab|aic|ar|arc|arq|ary|arz|azb|bcc|bgn|bqi|bqp|ckb|ckb-arab|dv|en-rtl|fa|fa-af|glk|ha-arab|haz|he|khw|kk-arab|kk-cn|ks|ks-arab|ku-arab|lki|lrc|luz|mzn|nqo|ota|phn|pnb|prd|prs|ps|sd|sdh|skr|skr-arab|tg-arab|tly|ug|ug-arab|ur|uz-arab|xpu|ydd|yi
 
={{#ifeq:{{{rtl|}}}|{{{rtl|-}}}|{{{rtl|}}}|{{#ifeq:{{{2|}}}|{{{2|-}}}|{{{2|}}}|rtl}}}}
----
|#default
Outputs "<tt>rtl</tt>" for right-to-left languages else "<tt>ltr</tt>".
={{#ifeq:{{{ltr|}}}|{{{ltr|-}}}|{{{ltr|}}}|{{#ifeq:{{{3|}}}|{{{3|-}}}|{{{3|}}}|ltr}}}}
 
}}<noinclude>{{documentation}}</noinclude>
'''{{int:usage}}:''' <nowiki>{{</nowiki>dir|''language_code''}}
 
Currently it recognizes the following rtl languages:
:'''ar · arc · dv · fa · fa-af · glk · ha · he · ks · ku · mzn · prd · ps · sd · ur · yi'''
 
[[Category:Internationalization templates|{{PAGENAME}}]]
[[Category:Function templates|{{PAGENAME}}]]
</noinclude>

Latest revision as of 04:39, 4 April 2021

ltrLua error in Module:TNT at line 158: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Documentation.tab.