Template:Pagelang: Difference between revisions

From Donate
Jump to navigation Jump to search
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: Line 1:
{{#ifeq: {{#titleparts:{{PAGENAME}}||-1}}
{{#ifeq: {{SUBPAGENAME}} | {{BASEPAGENAME}} | en | {{SUBPAGENAME}} }}<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>

Revision as of 16:21, 26 February 2014

en

Get the language code of the current page from its title. e.g. Ways to Give/sv result is sv, Ways to Give result is en