Difference between revisions of "Template:Language code of page"
Line 5: | Line 5: | ||
| {{lc:{{#explode:{{PAGENAME{{#if:{{{1|}}}|:{{{1}}}}}}}|{{Language delimiter}}|0}}}} | | {{lc:{{#explode:{{PAGENAME{{#if:{{{1|}}}|:{{{1}}}}}}}|{{Language delimiter}}|0}}}} | ||
|<!-- return nothing | |<!-- return nothing | ||
− | + | -->{{lc:{{#explode:{{PAGENAME{{#if:{{{1|}}}|:{{{1}}}}}}}|{{Language delimiter}}|0}}}}<!-- | |
-->}}<!-- | -->}}<!-- | ||
-->|{{lc:{{#explode:{{SUBPAGENAME{{#if:{{{1|}}}|:{{{1}}}}}}}|{{Language delimiter}}|0}}}}<!-- | -->|{{lc:{{#explode:{{SUBPAGENAME{{#if:{{{1|}}}|:{{{1}}}}}}}|{{Language delimiter}}|0}}}}<!-- | ||
-->}}</includeonly><noinclude> | -->}}</includeonly><noinclude> | ||
+ | |||
+ | |||
+ | {{#language:{{lc:{{#explode:{{SUBPAGENAME:Pt:Página principal}}|{{Language delimiter}}|0}}}}}} | ||
+ | ---- | ||
+ | {{lc:{{#explode:{{SUBPAGENAME:Pt:Página principal}}|{{Language delimiter}}|0}}}} | ||
+ | |||
+ | |||
Template '''{{PAGENAME}}''' returns the language code of a page. If no page name is passed in as the first parameter, the current page (in which it is being used) applies. If there is no language code, it returns empty. | Template '''{{PAGENAME}}''' returns the language code of a page. If no page name is passed in as the first parameter, the current page (in which it is being used) applies. If there is no language code, it returns empty. | ||
Revision as of 02:38, 21 April 2011
{{#explode:pt:página principal|template:language delimiter|0}}
{{#explode:pt:página principal|template:language delimiter|0}}
Template Language code of page returns the language code of a page. If no page name is passed in as the first parameter, the current page (in which it is being used) applies. If there is no language code, it returns empty.
Contents
Use
{{Language of page|optional page name}}
Examples
No page parameter
If no first parameter is passed in, the current page applies.
{{Language of page}}
Page with property Has language:: set
{{Language of page|Main Page}}
{{Language of page|Pt:Página principal}}
Page without property Has language:: set
If no first parameter is passed in, the current page applies.
{{Language of page|Template:Language of page}}