ទំព័រគំរូ:EngvarUsageThis template can be used in templates that are used on pages with different English language variants (see ENGVAR): articles in en-UK and articles in en-US. At the moment only UK and US English are recognised. Article editor: When using the prepared template in an article, the editor can set its parameter In the template: So your template takes input parameter ... | label= {{engvar| engvar={{{engvar}}} | en-uk=Football | en-us=Soccer }} ... Depending on the engvar input, it returns one of the words. Language idAt this moment, the next language ids are recognised.
Used in template code (template editor):
Unnamed parametersIn template code unnamed parameters can be used:
<!-- The next four rows are equal in template code: --> ... | label= {{engvar| engvar={{{engvar|}}} | en-uk=Football | en-us=Soccer }} | label= {{engvar| 1={{{engvar|}}} | uk=Football | us=Soccer }} | label= {{engvar| {{{engvar|}}} | Football | Soccer }} | label= {{engvar| 1={{{engvar|}}} | 2=Football | 3=Soccer }} ... Plain "en" variantIt is possible to define and use the plain English variant word(s) with id "en": In the template code, this must always be a named parameter. ... | label= {{engvar| {{{engvar|}}} | Football | Soccer | en=Association football }} ... Default language idDefault behaviour 1: To force a default language id (a language that will be used when there is no input, or a blank input) use | label= {{engvar| {{{engvar}}} | Football | Soccer | default=en-US }} Default behaviour 2: Another default-behaviour can be used: in your template, provide parameter | label= {{engvar| {{{engvar| en-US }}} | Football | Soccer | en=Association football }} This default last example will not use the default language when the engvar is a blank. Instead, the standard default word is returned (see below).This may occur in nested templates and pass-through variables. Default word(s)Default behaviour 3:
When the This default word(s) is determined as follows:
1st: the Default behaviour 4: From the above, it follows that entering Notes on coding
Full parameter listParameter list: {{engvar | engvar = | en-uk = | en-us = | en-aus = | en-nz = | en = | default= }} Or, unnamed: {{engvar | | | | | | en = | default= }} Todo
Examples
See also
|
Portal di Ensiklopedia Dunia