Template: Languages
(debugging...) |
m (debugging...) |
||
Line 2: | Line 2: | ||
This is the "Languages" template. | This is the "Languages" template. | ||
− | It shows the available translations of a page. Only works | + | It shows the available translations of a page. Only works for the "original" page and its translations which include this template itself. |
+ | |||
+ | '''IMPORTANT NOTE''' - This template should be included either in the "original" page and all its translations ONLY when almost one translation page really exist. | ||
It should be called in the following format: | It should be called in the following format: | ||
<pre> | <pre> | ||
− | {{Languages| | + | {{Languages|master page=MasterPage|language=Code}} |
</pre> | </pre> | ||
+ | where: | ||
+ | * 'MasterPage' is the "original" page | ||
+ | * 'Code' is the locale of language of the page in which the template has being included (either if the "original" or a translation page) | ||
+ | |||
+ | Example | ||
+ | |||
+ | If the "original" page 'MyPage' is written in English (as more often is) and it has a Italian translation at the page 'MyPage.it", then: | ||
+ | * in 'MyPage' include this: {{Languages|master page=MyPage|language=en}} | ||
+ | * in 'MyPage.it' include this: {{Languages|master page=MyPage|language=it}} | ||
Edit the page to see the template text. | Edit the page to see the template text. | ||
Line 13: | Line 24: | ||
<includeonly> | <includeonly> | ||
{{#ifeq:{{#ask: [[master page::{{{master page}}}]] [[language code::!{{{language}}}]]|format=count}}|0||<div style="text-align: left; background: #F7F7F7; border: 1px solid #B0BFE8; padding: 0.5em; "> | {{#ifeq:{{#ask: [[master page::{{{master page}}}]] [[language code::!{{{language}}}]]|format=count}}|0||<div style="text-align: left; background: #F7F7F7; border: 1px solid #B0BFE8; padding: 0.5em; "> | ||
− | {{ | + | {{LanguageOtherMsg|{{{language}}}}} {{#ask: [[master page::{{{master page}}}]] [[language code::!{{{language}}}]]| |
?language code =| | ?language code =| | ||
link=none| | link=none| | ||
format=list| | format=list| | ||
− | sep= | + | sep= ˙ _| |
template=LanguageLink| | template=LanguageLink| | ||
sort = language code| | sort = language code| |
Revision as of 16:30, 23 January 2011
This is the "Languages" template.
It shows the available translations of a page. Only works for the "original" page and its translations which include this template itself.
IMPORTANT NOTE - This template should be included either in the "original" page and all its translations ONLY when almost one translation page really exist.
It should be called in the following format:
{{Languages|master page=MasterPage|language=Code}}
where:
- 'MasterPage' is the "original" page
- 'Code' is the locale of language of the page in which the template has being included (either if the "original" or a translation page)
Example
If the "original" page 'MyPage' is written in English (as more often is) and it has a Italian translation at the page 'MyPage.it", then:
- in 'MyPage' include this:
- in 'MyPage.it' include this:
Edit the page to see the template text.