Jump to content

Template:Ethnologue18/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
update examples to generate working link
update documentation to work with any edition, add {{Documentation subpage}} header, add {{Template shortcut}}, update usage and examples, update see also links, use <includeonly> and {{sandbox other}} to keep /doc or /sandbox out of template category
Line 1: Line 1:
{{Documentation subpage}}
This template is designed for use in the reference section of a language article. It links to the appropriate article at ''[[Ethnologue]]''.
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{Larger|{{Template shortcut|E{{str right|{{BASEPAGENAME}}|10}}}}}}


'''{{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.
<pre>
{{Ethnologue18|xyz}} (or {{E18|xyz}})
</pre>


== Usage ==
Replace <code>xyz</code> with the [[ISO 639-3]] code for the language. A second, optional parameter is accepted:
; 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]]
: {{tld|{{BASEPAGENAME}}|xyz}}
: {{tld|E{{str right|{{BASEPAGENAME}}|10}}|xyz}}


; Two parameters
<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.
{{Ethnologue18|xyz|ABC}}</pre>
: {{tld|{{BASEPAGENAME}}|xyz|ABC}}
: {{tld|E{{str right|{{BASEPAGENAME}}|10}}|xyz|ABC}}


; No parameters
Replace <code>ABC</code> with wording for the template to display, thus:
: The template will revert to a generic citation and link to ''Ethnologue''
: {{tld|Ethnologue18|eng|English}}
: {{tld|{{BASEPAGENAME}}}}
: {{Ethnologue18|eng|English}}
: {{tld|E{{str right|{{BASEPAGENAME}}|10}}}}
If this parameter is omitted, the page name will be used, thus:
: {{tld|Ethnologue18|eng}}
: {{Ethnologue18|eng}}


== Examples ==
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 still required, thus:
; One parameter
: {{tld|Ethnologue18}}
: {{tld|{{BASEPAGENAME}}|eng}}
: {{Ethnologue18}}
: {{{{BASEPAGENAME}}|eng}}

; Two parameters
: {{tld|{{BASEPAGENAME}}|eng|English}}
: {{{{BASEPAGENAME}}|eng|English}}

; No parameters
: {{tld|{{BASEPAGENAME}}}}
: {{ {{BASEPAGENAME}} }}


==Note==
==Note==
For a reference to the ''Ethnologue'' population figures, enter "e18" 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|Ethnologue19}}, for references to the more recent edition
* {{tl|Ethnolink}}, for inline links when the data is not date-dependent
*{{tl|Ethnologue17}}, for references to the previous edition.
* {{tl|Ethnologue{{#expr:{{str right|{{BASEPAGENAME}}|10}}-1}}}}, {{tl|Ethnologue{{#expr:{{str right|{{BASEPAGENAME}}|10}}-2}}}}, etc., for references to the previous editions
* Newer and older versions of this template can be found at [[:Category:Language external link templates]]
*{{tl|Ethnologue16}}, etc., for references to the edition(s) before that.
* The link format <code><nowiki>[[Ethnologue:xxx]]</nowiki></code> can also be used, e.g. [[Ethnologue:eng]]
*{{tl|Ethnolink}}, for inline links when the data is not date-dependent.

The link format <code><nowiki>[[Ethnologue:xxx]]</nowiki></code> can also be used.


<includeonly>{{sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Language external link templates|Ethnologue]]
[[Category:Language external link templates|Ethnologue]]
}}</includeonly>

Revision as of 04:02, 5 July 2017

Template:Ethnologue18 is designed for use in the reference section of a language article. It links to the appropriate article at Ethnologue, 18th 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
{{Ethnologue18|xyz}}
{{E18|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.
{{Ethnologue18|xyz|ABC}}
{{E18|xyz|ABC}}
No parameters
The template will revert to a generic citation and link to Ethnologue
{{Ethnologue18}}
{{E18}}

Examples

One parameter
{{Ethnologue18|eng}}
Ethnologue18/doc at Ethnologue (18th ed., 2015) (subscription required)
Two parameters
{{Ethnologue18|eng|English}}
English at Ethnologue (18th ed., 2015) (subscription required)
No parameters
{{Ethnologue18}}
Lewis, M. Paul; Gary F. Simons; Charles D. Fennig, eds. (2015). Ethnologue: Languages of the World (18th ed.). Dallas, Texas: SIL International.

Note

For a reference to the Ethnologue population figures, enter "e18" 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