Template:Pagelang: Difference between revisions

Content deleted Content added
imported>Verdy p
m replace unnecessary old invokation of Template:PAGENAME by parser function "PAGENAME:"
Created page with "{{#ifeq: {{SUBPAGENAME}} | {{BASEPAGENAME}} | en | {{SUBPAGENAME}} }}<noinclude> Get the language code of the current page from its title. e.g. Ways to Give/sv result is..."
Line 1:
{{#ifeq: {{SUBPAGENAME}} | {{BASEPAGENAME}} | en | {{#titleparts:{{PAGENAMESUBPAGENAME}}||-1 }}<noinclude>
 
| {{#titleparts:{{PAGENAME}}|1}}
Get the language code of the current page from its title. e.g. [[Ways to Give/sv]] result is <tt>sv</tt>, [[Ways to Give]] result is <tt>en</tt>
|
</noinclude>
| {{#ifeq: {{#titleparts:{{PAGENAME}}||-1}}
| {{lc:{{PAGENAME:{{#titleparts:{{PAGENAME}}||-1}}}}}}
| {{#ifeq: {{#titleparts:{{PAGENAME}}||-1}}
| {{urlencode:{{#titleparts:{{PAGENAME}}||-1}}}}
| {{#ifeq: {{lc:{{#titleparts:{{PAGENAME}}||-1}}}}
| {{ucfirst:{{lc:{{#titleparts:{{PAGENAME}}||-1}}}}}}
|
| {{#switch: {{#titleparts:{{PAGENAME}}||-1}}
| doc | layout | sandbox | testcases =
| #default = {{#titleparts:{{PAGENAME}}||-1}}
}}
}}}}}}}}<noinclude>{{Documentation}}</noinclude>