Difference between revisions of "Template:Ethnologue16/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(remove old note about links needing to be fixed)
imported>Bsherr
m (as found, replacing Template:Tld with Template:Tlc or adding/updating category placement comments, plus general and typo fixes)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This template is designed for use in the reference section of a language article. It links to the appropriate article at the 16th edition of ''[[Ethnologue]]''.
+
{{Documentation subpage}}
 +
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
 +
{{Template shortcut|E{{str right|{{BASEPAGENAME}}|10}}}}
  
<pre>
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' is designed for use in the reference section of a language article. It links to the appropriate article at ''[[Ethnologue]]'', {{ordinal|{{str right|{{BASEPAGENAME}}|10}}}} edition.
{{Ethnologue16|xyz}} (or {{E16|xyz}})
 
</pre>
 
  
Replace <code>xyz</code> with the [[ISO 639-3]] code for the language. A second, optional parameter is accepted:
+
== Usage ==
 +
; One parameter
 +
: Replace <code>xyz</code> with the [[ISO 639-3]] code for the language. The page name will be used as the [[link text]]
 +
: {{tlc|{{BASEPAGENAME}}|xyz}}
 +
: {{tlc|E{{str right|{{BASEPAGENAME}}|10}}|xyz}}
  
<pre>
+
; Two parameters
{{Ethnologue16|xyz|ABC}}</pre>
+
: Replace <code>ABC</code> with the link text to be displayed. This may be useful if the ''Ethnologue'' name differs from the page name of the Wikipedia article.
 +
: {{tlc|{{BASEPAGENAME}}|xyz|ABC}}
 +
: {{tlc|E{{str right|{{BASEPAGENAME}}|10}}|xyz|ABC}}
  
Replace <code>ABC</code> with wording for the template to display, thus:
+
; No parameters
: {{tld|Ethnologue16|eng|English}}
+
: The template will revert to a generic citation and link to ''Ethnologue''
: {{Ethnologue16|eng|English}}
+
: {{tlc|{{BASEPAGENAME}}}}
 +
: {{tlc|E{{str right|{{BASEPAGENAME}}|10}}}}
  
If this parameter is omitted, the page name will be used, thus:
+
== Examples ==
: {{tld|Ethnologue16|eng}}
+
; One parameter
: {{Ethnologue16|eng}}
+
: {{tlc|{{BASEPAGENAME}}|eng}}
 +
: {{{{BASEPAGENAME}}|eng}}
  
Specifying the wording may be useful if the ''Ethnologue'' name differs from the page name of the Wikipedia article. If no parameter is supplied, the template will revert to a generic citation and link to ''Ethnologue'', though a pipe is required, thus:  
+
; Two parameters
: {{tld|Ethnologue16}}
+
: {{tlc|{{BASEPAGENAME}}|eng|English}}
: {{Ethnologue16}}
+
: {{{{BASEPAGENAME}}|eng|English}}
 +
 
 +
; No parameters
 +
: {{tlc|{{BASEPAGENAME}}}}
 +
: {{ {{BASEPAGENAME}} }}
  
 
==Note==
 
==Note==
For a reference to the ''Ethnologue'' population figures, enter "e16" in the <code>ref</code> parameter of the language infobox. This will autogenerate a reference based on this template, and is easier for other editors to update.
+
For a reference to the ''Ethnologue'' population figures, enter "e{{str right|{{BASEPAGENAME}}|10}}" in the <code>ref</code> parameter of {{tl|Infobox language}}. This will automatically generate a reference based on this template, and is easier for other editors to update.
  
 
==See also==
 
==See also==
*{{tl|Ethnologue17}}, for references to the current edition.
+
* {{tl|Ethnolink}}, for inline links when the data is not date-dependent
*{{tl|Ethnolink}}, which is more convenient for inline identification when the data is not date-dependent.
+
* {{tl|Ethnologue{{#expr:{{str right|{{BASEPAGENAME}}|10}}-1}}}}, {{tl|Ethnologue{{#expr:{{str right|{{BASEPAGENAME}}|10}}-2}}}}, etc., for references to the previous editions
*{{tl|Ethnologue15}}, for references to the previous edition.
+
* Newer and older versions of this template can be found at [[:Category:Language external link templates]]
 +
* The link format <code><nowiki>[[Ethnologue:xxx]]</nowiki></code> can also be used, e.g. [[Ethnologue:eng]]
  
 +
<includeonly>{{sandbox other||
 +
<!-- Categories below this line; interwikis at Wikidata -->
 
[[Category:Language external link templates|Ethnologue]]
 
[[Category:Language external link templates|Ethnologue]]
 +
}}</includeonly>

Latest revision as of 23:23, 9 August 2020

Template:Ethnologue16 is designed for use in the reference section of a language article. It links to the appropriate article at Ethnologue, Template:Ordinal edition.

Usage

One parameter
Replace xyz with the ISO 639-3 code for the language. The page name will be used as the link text
{{Ethnologue16|xyz}}
{{E16|xyz}}
Two parameters
Replace ABC with the link text to be displayed. This may be useful if the Ethnologue name differs from the page name of the Wikipedia article.
{{Ethnologue16|xyz|ABC}}
{{E16|xyz|ABC}}
No parameters
The template will revert to a generic citation and link to Ethnologue
{{Ethnologue16}}
{{E16}}

Examples

One parameter
{{Ethnologue16|eng}}
Ethnologue16/doc at Ethnologue (16th ed., 2009)
Two parameters
{{Ethnologue16|eng|English}}
English at Ethnologue (16th ed., 2009)
No parameters
{{Ethnologue16}}
Lewis, M. Paul, ed. (2009). Ethnologue: Languages of the World (16th ed.). Dallas, Texas: SIL International.

Note

For a reference to the Ethnologue population figures, enter "e16" in the ref parameter of {{Infobox language}}. This will automatically generate a reference based on this template, and is easier for other editors to update.

See also