« Modèle:Dir » : différence entre les versions

De wiki-spl
Aller à la navigation Aller à la recherche
test0>SVG
m (Protected "Template:Dir": Highly visible template: regular vandalism ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
test0>Verdy p
(for better compatiblity, define prefered parameter aliases ltr= and rtl= (instead of just parameters 2 and 3 which may contain "=" signs); note also that parameter 1=lang is optional)
Ligne 1 : Ligne 1 :
{{#switch:{{lc:{{{1|{{int:lang}}}}}}}|ar|arc|arz|azb|bcc|ckb|bqi|dv|fa|fa-af|glk|ha|he|kk-arab|kk-cn|ks|ku-arab|mzn|pnb|prd|ps|sd|ug|ur|ydd|yi={{{2|rtl}}}|{{{3|ltr}}}}}<noinclude>{{documentation}}</noinclude>
{{#switch:{{lc:{{#if:{{{lang|}}}|{{{lang|}}}|{{#if:{{{1|}}}|{{{1|}}}|{{int:lang}}}}}}}}
|ar|arc|arz|azb|bcc|ckb|bqi|dv|fa|fa-af|glk|ha|he|kk-arab|kk-cn|ks|ku-arab|mzn|pnb|prd|ps|sd|ug|ur|ydd|yi
={{#if:{{{rtl|}}}|{{{rtl|}}}|{{#if:{{{2|}}}|{{{2|}}}|rtl}}}}
|#default
={{#if:{{{ltr|}}}|{{{ltr|}}}|{{#if:{{{3|}}}|{{{3|}}}|ltr}}}}
}}<noinclude>{{documentation}}</noinclude>

Version du 7 juillet 2017 à 18:17

{{#switch:{{#if:||{{#if:||⧼lang⧽}}}} |ar|arc|arz|azb|bcc|ckb|bqi|dv|fa|fa-af|glk|ha|he|kk-arab|kk-cn|ks|ku-arab|mzn|pnb|prd|ps|sd|ug|ur|ydd|yi ={{#if:||{{#if:||rtl}}}} |#default ={{#if:||{{#if:||ltr}}}} }}{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}{{#if:| [[Category:Template documentation pages{{#translation:}}]] }}