Difference between revisions of "Template:TranslatedPageName"
Jump to navigation
Jump to search
Bumsakalaka (talk | contribs) |
Bumsakalaka (talk | contribs) |
||
Line 43: | Line 43: | ||
== Old stuff == | == Old stuff == | ||
Older code before DisplayTitle extension using 1st parameter for page and 2nd for language. But this approach now works with <code><nowiki>DISPALYTITLE</nowiki></code> directive.<br /> | Older code before DisplayTitle extension using 1st parameter for page and 2nd for language. But this approach now works with <code><nowiki>DISPALYTITLE</nowiki></code> directive.<br /> | ||
This old code is not compatible with current [[:Template:UX]], using <code>title</code> attribute. | |||
<code><nowiki>{{#ifexist:Translations:{{{1|{{#titleparts:{{FULLPAGENAME}}|-1}}}}}/Page display title/{{{2|{{PAGELANGUAGE}}}}}|{{Translations:{{{1|{{#titleparts:{{FULLPAGENAME}}|-1}}}}}/Page display title/{{{2|{{PAGELANGUAGE}}}}}}}|{{{1|{{FULLPAGENAME}}}}}}}</code></nowiki> | <code><nowiki>{{#ifexist:Translations:{{{1|{{#titleparts:{{FULLPAGENAME}}|-1}}}}}/Page display title/{{{2|{{PAGELANGUAGE}}}}}|{{Translations:{{{1|{{#titleparts:{{FULLPAGENAME}}|-1}}}}}/Page display title/{{{2|{{PAGELANGUAGE}}}}}}}|{{{1|{{FULLPAGENAME}}}}}}}</code></nowiki> | ||
[[Category:Editor Manual]] | [[Category:Editor Manual]] | ||
</noinclude> | </noinclude> |
Latest revision as of 16:37, 10 April 2024
Description
This template is used to show translated page name where it's included. Ideal for Breadcrumbs. With include this code into page: {{TranslatedPageName}}
Parameters
Examples
Code | Description |
---|---|
{{TranslatedPageName}} |
Show translate page name |
Template:TranslatedPageName | |
{{TranslatedPageName|Main Page}} |
Show translate page name of Main Page in current page language |
Main Page | |
{{TranslatedPageName|Main Page|de}} |
Show translate page name of Main Page in requested language |
Hauptseite | |
{{TranslatedPageName|Glossary/Abbey|cs}} |
Show translate page name of Glossary/Abbey in requested language |
Slovník/Opatství | |
{{TranslatedPageName|The Messages}} |
Show translate page name of The Messengers, which is using {{DISPLAYTITLE}}
|
The Messengers | |
{{TranslatedPageName|The Messages|fr}} |
Show translate page name of The Messengers, which is using {{DISPLAYTITLE}}
|
Les Hérauts | |
{{TranslatedPageName|The Drawbridges}} |
Show translate page name of The Drawbridges, which is using {{UX|title=....}}
|
The Drawbridges |
Old stuff
Older code before DisplayTitle extension using 1st parameter for page and 2nd for language. But this approach now works with DISPALYTITLE
directive.
This old code is not compatible with current Template:UX, using title
attribute.
{{#ifexist:Translations:{{{1|{{#titleparts:{{FULLPAGENAME}}|-1}}}}}/Page display title/{{{2|{{PAGELANGUAGE}}}}}|{{Translations:{{{1|{{#titleparts:{{FULLPAGENAME}}|-1}}}}}/Page display title/{{{2|{{PAGELANGUAGE}}}}}}}|{{{1|{{FULLPAGENAME}}}}}}}</code>