Difference between revisions of "Template:Language with name/for/doc"

From blackwiki
Jump to navigation Jump to search
imported>Hyacinth
m (→‎Example: switch Thuringia & Thüringen)
imported>Nardog
({{template shortcut}})
 
(11 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page. -->
+
{{template shortcut|langnf}}
  
 
== Usage ==
 
== Usage ==
{{tl|{{PAGENAME}}}} is a template used to indicate to readers that the previous term or phrase is from a non-English or foreign language, providing a translation of the non-English term. There appear to be three parameters, one being the foreign language and one being the ''foreign language'' term or phrase.
+
This template provides a translation into English of a non-English term or phrase, and optionally links to the article on the foreign language.
 +
 
 +
==Parameters==
 +
There are five parameters, three numbered:
 +
# passed as the language name only when <code>rtl</code> is selected
 +
# the foreign-language name
 +
# the English translation of the term or phrase in question
 +
 
 +
and two named:
 +
* <code>links</code> set to <code>no</code> when the language is not to be wiki-linked
 +
* <code>rtl</code> which indicates a [[right-to-left]] script
  
 
It should generally be placed after the non-English term or phrase, and contain the English translation of the term or phrase.
 
It should generally be placed after the non-English term or phrase, and contain the English translation of the term or phrase.
  
 
== Example ==
 
== Example ==
 
 
'''Edit'''
 
'''Edit'''
* Weimar is located in the federal state of ''Thüringen'' (<code><nowiki>{{Language with name/for||German|Thuringia}}</nowiki></code>).
+
* Weimar is located in the federal state of ''Thüringen'' (<code><nowiki>{{langnf||German|Thuringia}}</nowiki></code>).
* Weimar is located in the federal state of ''Thüringen'' (<code><nowiki>{{Language with name/for|2=German|3=[[Thuringia]]}}</nowiki></code>).
+
* Weimar is located in the federal state of ''Thüringen'' (<code><nowiki>{{langnf|2=German|3=[[Thuringia]]}}</nowiki></code>).
* <code><nowiki>{{Language with name/for|1=1|2=2|3=3}}</nowiki></code>
 
  
 
'''Resulting text'''
 
'''Resulting text'''
* Weimar is located in the federal state of ''Thüringen'' ({{Language with name/for||German|Thuringia}}).
+
* Weimar is located in the federal state of ''Thüringen'' ({{langnf||German|Thuringia}}).
* Weimar is located in the federal state of ''Thüringen'' ({{Language with name/for|2=German|3=[[Thuringia]]}}).
+
* Weimar is located in the federal state of ''Thüringen'' ({{langnf|2=German|3=[[Thuringia]]}}).
* {{Language with name/for|1=1|2=2|3=3}}
 
  
 
== See also ==
 
== See also ==
* {{tl|Lang-x/doc}}, the opposite
 
 
* {{Tl|Lang}}
 
* {{Tl|Lang}}
 +
* {{tl|Lang-x}}, the opposite
  
<includeonly>
+
<includeonly>{{Sandbox other||
 
<!-- Categories and interwikis go here: -->
 
<!-- Categories and interwikis go here: -->
[[Category:Multilingual support templates]]
+
[[Category:Wikipedia multilingual support templates]]
</includeonly>
+
}}</includeonly>

Latest revision as of 11:07, 20 December 2020

Usage

This template provides a translation into English of a non-English term or phrase, and optionally links to the article on the foreign language.

Parameters

There are five parameters, three numbered:

  1. passed as the language name only when rtl is selected
  2. the foreign-language name
  3. the English translation of the term or phrase in question

and two named:

  • links set to no when the language is not to be wiki-linked
  • rtl which indicates a right-to-left script

It should generally be placed after the non-English term or phrase, and contain the English translation of the term or phrase.

Example

Edit

  • Weimar is located in the federal state of Thüringen ({{langnf||German|Thuringia}}).
  • Weimar is located in the federal state of Thüringen ({{langnf|2=German|3=[[Thuringia]]}}).

Resulting text

  • Weimar is located in the federal state of Thüringen (German for 'Thuringia').
  • Weimar is located in the federal state of Thüringen (German for 'Thuringia').

See also