Template:Language: Difference between revisions

From Greyhawk Wiki
Jump to navigation Jump to search
per https://meta.wikimedia.org?oldid=15806065
m 1 revision imported: Import from Mediawiki
 
(15 intermediate revisions by 2 users not shown)
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>
<includeonly>{| style="float: right; clear: right; width:265px; border:1px solid midnightblue; padding: 2px; margin:1em;"
:''This template is outdated. Use <nowiki>{{#language:fr|de}}</nowiki> -> {{#language:fr|de}}.''
|+'''Greyhawk [[:Category:Languages|Language]]'''
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.
<tr><td colspan="2" style="background: DarkSlateBlue; line-height: 150%; text-align: center; font-family: Arial Black, Arial, sans-serif; font-size: 1.3em; color: white; font-weight: bold;">{{#if:{{{name|}}} |{{{name}}} |{{PAGENAME}}}}</td></tr><tr>
 
  <td colspan="2" style="text-align:center">{{{image|}}}</td>
{{tdoc
</tr><tr>
|1=1
  <td colspan="2" style="text-align:center; line-height: 1em;"> <span style="font-size:8pt;">{{{caption}}}</td>
|1d=language code for the language name to be produced
</tr><tr>
|1def=
  <td colspan="2" style="background: midnightblue; line-height: 1px;"></td>
|2=2
</tr>{{#if:{{{location|}}}|<tr style="vertical-align: top;">
|2d=language code for the language in which the name is expressed
  <th>'''Spoken in:'''</th>
|2def=the result of {{xpsoc|uselang|gives=, giving}}
  <td>{{{location|}}}</td>
|3=3
</tr>|}}{{#if:{{{people|}}}|<tr style="vertical-align: top;">
|3d=if non-empty: do ''not'' produce the English word if the word in the requested language is not available; instead, produce nothing
  <th>'''Spoken by:'''</th>
|3def=
  <td>{{{people|}}}</td>
|i18n-method=autotranslate
</tr>|}}{{#if:{{{script|}}}|<tr style="vertical-align: top;">
|i18n-desc=
  <th>'''Script:'''</th>
|name=Language
  <td>{{{script|}}}</td>
|relieson=
</tr>|}}{{#if:{{{family|}}}|<tr style="vertical-align: top;">
*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/}}
  <th>'''Language family:'''</th>
*<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:
  <td>{{{family|}}}</td>
{{Special:PrefixIndex/Template:Language/}}
</tr>|}}
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
[[Category:Languages]]</includeonly>
|examples=<nowiki/>
<noinclude>
*{{xpsoc|language}}
{{Language
 
|image=[[Image:Flan01.jpg]]
*{{xpsoc|language|ar}}
|caption=Ancient Flan tribesmen, as depicted in ''[[The Adventure Begins]]'' (1998). Art by David Roach.
*{{xpsoc|language|de}}
|name=Flan language
*{{xpsoc|language|is}}
|location=[[Tenh]], [[Rovers of the Barrens]], [[Geoff]], other isolated locales
*{{xpsoc|language|nl}}
|people=[[Flan]]
*{{xpsoc|language|zh-hant}}
|script=
|family=Flan
}}
This template is for use in any article about a language in the {{smallcaps|[[World of Greyhawk]]}} campaign setting.


*{{xpsoc|language|ar||x}}
==Usage==
*{{xpsoc|language|de||x}}
Copy and paste the code section below to the top of the article being written and fill in the information ("parameter") areas.
*{{xpsoc|language|is||x}}
*{{xpsoc|language|nl||x}}
*{{xpsoc|language|zh-hant||x}}


*{{xpsoc|language|ar|de}}
The image and caption parameters are optional, but are preferred. The recommended image size is a width of 250px so that it will completely fill the infobox without increasing its size.
*{{xpsoc|language|de|de}}
*{{xpsoc|language|is|de}}
*{{xpsoc|language|nl|de}}
*{{xpsoc|language|zh-hant|de }}


*{{xpsoc|language|ar|de|x}}
If any fields are left undefined, they will not appear.
*{{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:
Add wiki links to articles by putting the name of the place inside double brackets, <nowiki>[[like this]]</nowiki>.
*{{xpsoc|language/nl|ar}}
<pre>
*{{xpsoc|language/nl|de}}
{{Language
*{{xpsoc|language/nl|is}}
|image    =
*{{xpsoc|language/nl|nl}}
|caption  =
*{{xpsoc|language/nl|zh-hant}}
|name    =
|location =
|people  =
|script  =
|family  =
}}</pre>


|seealso=<nowiki/>
A brief description of how to fill out each parameter follows:
*[[commons:Template:Language]]
* '''Image'''—if an image of common speakers of the language has been [[Special:Upload|uploaded]], place the link to it like this: <nowiki>[[File:ExampleName.png|250px]]</nowiki>.
*[[mw:Help:Magic_words#Miscellaneous #language]] - returns the local name of the language
* '''Caption'''—describe the image briefly.  Cite which product the illustration is from and the artist or creator.
*[[svn:/trunk/phase3/languages/Names.php]]
* '''Name'''—only necessary if it differs significantly from the page name
Similar to [[:en:Template:Language]] and [[:fr:Modèle:Langue-local]].
* '''location:'''—the nation(s), region(s), or place(s) the language is commonly spoken.  Place these in {nowiki}[[wikilinks]]</nowiki>, if possible.
}}
* '''people:'''—the people who typically speak the language.  Place these in {nowiki}[[wikilinks]]</nowiki>, if possible.
* '''script:'''—the type of alphabet used to write the language.
* '''family:'''—if the language is related or derived from another language.


[[Category:User interface language dependent templates|Language]]
[[Category:Infoboxes]]
[[Category:Set of templates, each containing multiple texts in one language]]
[[Category:Languages| ]]
<div style="clear:both;"></div><!--template:documentation--></div></div></noinclude>
</noinclude>

Latest revision as of 11:12, 30 September 2024


Greyhawk Language
Flan language
Ancient Flan tribesmen, as depicted in The Adventure Begins (1998). Art by David Roach.
Spoken in: Tenh, Rovers of the Barrens, Geoff, other isolated locales
Spoken by: Flan
Language family: Flan

This template is for use in any article about a language in the World of Greyhawk campaign setting.

Usage

Copy and paste the code section below to the top of the article being written and fill in the information ("parameter") areas.

The image and caption parameters are optional, but are preferred. The recommended image size is a width of 250px so that it will completely fill the infobox without increasing its size.

If any fields are left undefined, they will not appear.

Add wiki links to articles by putting the name of the place inside double brackets, [[like this]].

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

A brief description of how to fill out each parameter follows:

  • Image—if an image of common speakers of the language has been uploaded, place the link to it like this: [[File:ExampleName.png|250px]].
  • Caption—describe the image briefly. Cite which product the illustration is from and the artist or creator.
  • Name—only necessary if it differs significantly from the page name
  • location:—the nation(s), region(s), or place(s) the language is commonly spoken. Place these in {nowiki}wikilinks</nowiki>, if possible.
  • people:—the people who typically speak the language. Place these in {nowiki}wikilinks</nowiki>, if possible.
  • script:—the type of alphabet used to write the language.
  • family:—if the language is related or derived from another language.