Template:Language: Difference between revisions

From Greyhawk Wiki
Jump to navigation Jump to search
per https://meta.wikimedia.org?oldid=15806065
m 2 revisions imported: Imported from CF GH Wiki
Line 1: Line 1:
{{#ifeq:[[:Template:Language/{{#if:{{{2|}}}|{{{2}}}|{{uselang}}}}]]|{{language/{{#if:{{{2|}}}|{{{2}}}|{{uselang}}}}}}|{{#if:{{{3|}}}||{{language/en|{{{1|}}}}}}}|{{ifnotempty1|{{language/{{#if:{{{2|}}}|{{{2}}}|{{uselang}}}}|{{{1|}}}}}|{{#if:{{{3|}}}||{{language/en|{{{1|}}}}}}}}}}}<noinclude>
{| class="toccolours" style="float:right; margin:0 0 0.5em 1em; width:21em; clear:right;"
:''This template is outdated. Use <nowiki>{{#language:fr|de}}</nowiki> -> {{#language:fr|de}}.''
|-
This template produces the word for a language given the language code, in a given language. By default, the fall-back language is English. Optionally this is suppressed, and the template produces nothing if the word is not available in the desired language. This can be useful if the English term is given anyway, with another call of the template.  
|colspan=2 style="text-align:center; font-size: larger;" | '''[[Greyhawk languages|Greyhawk Language]]'''
|-
!colspan=2 style="font-size: large; background-color:{{{bgcolor|#000}}}; color:{{{fgcolor|#fff}}}; line-height: 300%; text-align:center" | <font face="Garamond">{{{name}}}
|-
|colspan=2 style="text-align:center;" | {{{image}}}
|-
|colspan=2 style="text-align:center;" | {{{caption}}}
|-
!colspan=2 style="background-color:{{{bgcolor|#000}}}; line-height: 1%"|
|-
|'''Spoken in''' || {{{location|''Unknown''}}}
|-
|'''Spoken by''' || {{{people|''Unknown''}}}
|-
|'''Script''' || {{{script|''Unknown''}}}
|-
|'''Language Family''' || {{{family|''Unknown''}}}
|}<noinclude>
This template is for use in any article about a language in the ''[[World of Greyhawk]]'' campaign setting. The image and caption parameters are optional, if left undefined they will not appear. All other parameters will appear as ''unknown'' by default. The recommended image size is a width of 250px so that it will completely fill the infobox without increasing its size.


{{tdoc
==Usage==
|1=1
{| style="border: none; background: none;"
|1d=language code for the language name to be produced
|<pre>
|1def=
{{Greyhawk Language
|2=2
|image=
|2d=language code for the language in which the name is expressed
|caption=
|2def=the result of {{xpsoc|uselang|gives=, giving}}
|name=
|3=3
|location=
|3d=if non-empty: do ''not'' produce the English word if the word in the requested language is not available; instead, produce nothing
|people=
|3def=
|script=
|i18n-method=autotranslate
|family=
|i18n-desc=
}}</pre>
|name=Language
|}
|relieson=
*The page <code>MediaWiki:Lang/</code>''xx'' for the user language ''xx'' set in the preferences; it should contain the language code ''xx'' {{Special:PrefixIndex/mediawiki:Lang/}}
*<code>Template:Language/</code>''xx'' for the language in which the name is expressed, with in that page support for the language name to be produced:
{{Special:PrefixIndex/Template:Language/}}
They can be copied from commons (see [http://commons.wikimedia.org/w/index.php?title=Special%3APrefixIndex&prefix=Language%2F&namespace=10 list]), but the following modification is needed:
*the default is removed
|examples=<nowiki/>
*{{xpsoc|language}}


*{{xpsoc|language|ar}}
Two additional optional parameters exist to enable changing of the background and foreground colours in the name part of the infobox, the default is white text on a black background.
*{{xpsoc|language|de}}
*{{xpsoc|language|is}}
*{{xpsoc|language|nl}}
*{{xpsoc|language|zh-hant}}


*{{xpsoc|language|ar||x}}
<pre><nowiki>
*{{xpsoc|language|de||x}}
|fgcolor=#fff
*{{xpsoc|language|is||x}}
|bgcolor=#000
*{{xpsoc|language|nl||x}}
</nowiki></pre>
*{{xpsoc|language|zh-hant||x}}


*{{xpsoc|language|ar|de}}
[[Category:Greyhawk languages|*]]
*{{xpsoc|language|de|de}}
[[Category:Templates|Language]]
*{{xpsoc|language|is|de}}
*{{xpsoc|language|nl|de}}
*{{xpsoc|language|zh-hant|de }}


*{{xpsoc|language|ar|de|x}}
</noinclude>
*{{xpsoc|language|de|de|x}}
*{{xpsoc|language|is|de|x}}
*{{xpsoc|language|nl|de|x}}
*{{xpsoc|language|zh-hant|de|x}}
 
If the subtemplate for the language in which the name is expressed is known to exist, and fall-back to English if the word is not available is not desired, then the subtemplate can more efficiently be called directly as follows:
*{{xpsoc|language/nl|ar}}
*{{xpsoc|language/nl|de}}
*{{xpsoc|language/nl|is}}
*{{xpsoc|language/nl|nl}}
*{{xpsoc|language/nl|zh-hant}}
 
|seealso=<nowiki/>
*[[commons:Template:Language]]
*[[mw:Help:Magic_words#Miscellaneous #language]] - returns the local name of the language
*[[svn:/trunk/phase3/languages/Names.php]]
Similar to [[:en:Template:Language]] and [[:fr:Modèle:Langue-local]].
}}
 
[[Category:User interface language dependent templates|Language]]
[[Category:Set of templates, each containing multiple texts in one language]]
<div style="clear:both;"></div><!--template:documentation--></div></div></noinclude>

Revision as of 05:24, 7 December 2018

Greyhawk Language
{{{name}}}
{{{image}}}
{{{caption}}}
Spoken in Unknown
Spoken by Unknown
Script Unknown
Language Family Unknown

This template is for use in any article about a language in the World of Greyhawk campaign setting. The image and caption parameters are optional, if left undefined they will not appear. All other parameters will appear as unknown by default. The recommended image size is a width of 250px so that it will completely fill the infobox without increasing its size.

Usage

{{Greyhawk Language
|image=
|caption=
|name=
|location=
|people=
|script=
|family=
}}

Two additional optional parameters exist to enable changing of the background and foreground colours in the name part of the infobox, the default is white text on a black background.

|fgcolor=#fff
|bgcolor=#000