Template: Languages

From LibrePlanet
Jump to: navigation, search
m (debugging...)
(debugging...)
Line 2: Line 2:
 
This is the "Languages" template. Edit the page to see the template text.
 
This is the "Languages" template. Edit the page to see the template text.
  
'''Description:'''
+
'''Description''':
  
 
This template shows the available translations of a page. Only works for the "original" page and its translations which include this template itself.
 
This template shows the available translations of a page. Only works for the "original" page and its translations which include this template itself.
Line 8: Line 8:
 
''IMPORTANT NOTE'' - This template should be included, either in the "original" page and in all its translations, ONLY IF almost one translation of the original page really exist in the wiki.
 
''IMPORTANT NOTE'' - This template should be included, either in the "original" page and in all its translations, ONLY IF almost one translation of the original page really exist in the wiki.
  
'''Usage:'''
+
'''Usage''':
  
 
It should be called in the following format:
 
It should be called in the following format:
Line 18: Line 18:
 
* 'Code' is the locale of language of the page in which the template has being included (either if the "original" or a translation 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:
+
'''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:
 
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:
Line 32: Line 32:
 
</noinclude>
 
</noinclude>
 
<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.2em; ">
{{LanguageOtherMsg|{{{language}}}}}&nbsp;&nbsp;{{#ask: [[master page::{{{master page}}}]] [[language code::!{{{language}}}]]|
+
[[{{LanguageOtherMsg|{{{language}}}}}|Translation_Policy]]&nbsp;&nbsp;{{#ask: [[master page::{{{master page}}}]] [[language code::!{{{language}}}]]|
 
   ?language code =|
 
   ?language code =|
 
   link=none|
 
   link=none|

Revision as of 16:47, 23 January 2011

This is the "Languages" template. Edit the page to see the template text.

Description:

This template 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 in all its translations, ONLY IF almost one translation of the original page really exist in the wiki.

Usage:

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:
{{Languages|master page=MyPage|language=en}}
  • in 'MyPage.it', include this:
{{Languages|master page=MyPage|language=it}}