Template:RelevantLanguage: Difference between revisions

From translatewiki.net
Jump to navigation Jump to search
No edit summary
(another method to get the translation language of current page)
Line 6: Line 6:
 
| {{#ifeq: {{NAMESPACE}}:{{BASEPAGENAME}}/{{SUBPAGENAME}} | {{FULLPAGENAME}}
 
| {{#ifeq: {{NAMESPACE}}:{{BASEPAGENAME}}/{{SUBPAGENAME}} | {{FULLPAGENAME}}
 
| {{SUBPAGENAME}}
 
| {{SUBPAGENAME}}
| {{UILANGCODE}}
+
| {{#if: {{#translation:}}
  +
| {{#sub:{{#translation:}}|1}}
  +
| {{UILANGCODE}}
  +
}}
 
}}
 
}}
 
}}
 
}}

Revision as of 18:35, 8 June 2022

en

Test Template Info-Icon - Version (2).svg
The documentation of this template is included from its /doc subpage. [Edit]

This template is designed to be used in Template:Msg-mw and the like. It returns the subpagename of the current page (i.e. the current translation target's language code), and falls back to the user's UI language code.

Syntax:
  • {{RelevantLanguage}}