Difference between revisions of "Template:LSLG"
Jump to navigation
Jump to search
m (minor error accidentily stripped the '''text''' support) |
|||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:m|{{#len:{{{1|}}}}}}}{{#vardefine:t|{{#expr:(({{#var:m}} - {{#rpos:{{{1|}}}|/}}) = 4) and ({{#var:m}} > 3)}}}}{{#vardefine:lang|{{#ifexpr:{{#len:{{{3|}}}}} = 3|/{{{3|}}}|{{#ifexpr:({{#len:{{PAGENAMEE}}}} - {{#rpos:{{PAGENAMEE}}|/}}) = 4|{{#ifexpr:{{#var:t}}|{{#sub:{{{1|}}}|-4}}|{{#sub:{{PAGENAMEE}}|-4}}}}|/eng}}}}}}[[LSL_{{#ifexpr:{{#var:t}}|{{#sub:{{{1|}}}|0|-4}}|{{{1|}}}}}{{#ifeq:{{#var:lang}}|/eng||{{#var:lang}}}}|{{#ifexpr:{{#var:t}}|{{#sub:{{{1|}}}|0|-4}}|{{{1}}}}}]]</includeonly><noinclude> | <includeonly>{{#vardefine:m|{{#len:{{{1|}}}}}}}{{#vardefine:t|{{#expr:(({{#var:m}} - {{#rpos:{{{1|}}}|/}}) = 4) and ({{#var:m}} > 3)}}}}{{#vardefine:lang|{{#ifexpr:{{#len:{{{3|}}}}} = 3|/{{{3|}}}|{{#ifexpr:({{#len:{{PAGENAMEE}}}} - {{#rpos:{{PAGENAMEE}}|/}}) = 4|{{#ifexpr:{{#var:t}}|{{#sub:{{{1|}}}|-4}}|{{#sub:{{PAGENAMEE}}|-4}}}}|/eng}}}}}}[[LSL_{{#ifexpr:{{#var:t}}|{{#sub:{{{1|}}}|0|-4}}|{{{1|}}}}}{{#ifeq:{{#var:lang}}|/eng||{{#var:lang}}}}|{{#if:{{{2|}}}|{{{2|}}}|{{#ifexpr:{{#var:t}}|{{#sub:{{{1|}}}|0|-4}}|{{{1}}}}}}}]]</includeonly><noinclude> | ||
<nowiki>{{LSLG|page|text|lang}}</nowiki><br/> | <nowiki>{{LSLG|page|text|lang}}</nowiki><br/> | ||
If '''page''' has a 3 char language code it is stripped for the display if text is excluded.<br/> | If '''page''' has a 3 char language code it is stripped for the display if text is excluded.<br/> |