Difference between revisions of "Template:LanguageSet"

From BITPlan Wiki
Jump to navigation Jump to search
Line 9: Line 9:
 
* <tt>language</tt>: a standard [[Property:language code|language code]]
 
* <tt>language</tt>: a standard [[Property:language code|language code]]
 
</noinclude><includeonly>
 
</noinclude><includeonly>
{{#ifeq:{{#ask: [[master page::{{{master page}}}]] [[language code::!{{{language}}}]]|format=count}}|0||
+
{{#ifeq:{{#ask: [[master page::{{{master page}}}]] [[language code::!{{{language}}}]]|format=count}}|0||  
{{#switch:{{{language}}}|
 
    de = Diese Seite in anderen Sprachen: |
 
    fr = Cette page dans d'autres langues : |
 
    ja = 他の言語でのこのページ: |
 
    nl = Deze pagina in andere talen: |
 
    ru = Эта страница на других языках: |
 
    zh-hans = 本页面的其他语种: |
 
    uk = Ця сторінка на інших мовах: |
 
    This page in other languages:}}
 
 
{{#ask: [[master page::{{{master page}}}]] [[language code::!{{{language}}}]]|
 
{{#ask: [[master page::{{{master page}}}]] [[language code::!{{{language}}}]]|
 
   ?language code =|
 
   ?language code =|
Line 30: Line 21:
 
   searchlabel = [&hellip;]
 
   searchlabel = [&hellip;]
 
}}
 
}}
</div>}}
+
}}
 
<div style="display: none; read: none;">
 
<div style="display: none; read: none;">
 
[[master page::{{{master page}}}]] [[language code::{{{language}}}]]  
 
[[master page::{{{master page}}}]] [[language code::{{{language}}}]]  
 
</div>
 
</div>
 
</includeonly>
 
</includeonly>

Revision as of 10:20, 1 September 2017

From http://semantic-mediawiki.org/wiki/Template:Language

This template is used for stating the language for some content page.

Usage:

{{languageTest|master page=Page title|language=en}}

The parameters have the following meaning:

  • master page: the «main» page about that topic, usually the article with the English documentation for the most current version
  • language: a standard language code