Module:ISO 639 name implements:
For code-to-name mapping, this module uses data from:
For name-to-code mapping, this module uses data from:
Returns true
when <{{var|code}}>
is found in one of the ISO 639-1, -2, -3, -5, or override tables; returns nil else.
Useage:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_exists|</nowiki><{{var|code}}>}}
Examples:
without required <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_exists}}</nowiki>
→
with valid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_exists|nav}}</nowiki>
→
with invalid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_exists|xx}}</nowiki>
→
Returns language name associated with <{{var|code}}>
. May return an error message with or without a language name.
Optional parameters:
suppresses error messages
creates link to en.wiki article about the language
– requires ; label for the language-name link: <nowiki>[[</nowiki><{{var|language name}}> language|<{{var|label text}}>]]
queries part tables only; returns language name as defined in the base data tables without the removal of disambiguation informationExamples:
without required <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name}}</nowiki>
→
with valid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|nav}}</nowiki>
→
with invalid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|xx}}</nowiki>
→
with invalid <{{var|code}}>
(IETF language tag):
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|nv-Latn}}</nowiki>
→
with invalid <{{var|code}}>
, error message suppressed:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|nv-Latn|hide-err=yes}}</nowiki>
→
linked:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|nav|link=yes}}</nowiki>
→
linked with alternate spelling:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|nav|link=yes|label=Navaho}}</nowiki>
→
ISO 639-1 code el
is normally overridden by a setting in :
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|el}}</nowiki>
→
ISO 639-1 code el
with override suppressed:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|el|raw=yes}}</nowiki>
→
ISO 639-3 code ina
name has disambiguation that is normally suppressed:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|ina}}</nowiki>
→
ISO 639-3 code ina
with disambiguation:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_to_name|ina|raw=yes}}</nowiki>
→
Same as iso_639_code_to_name
except that <{{var|code}}>
must be an ISO 639-1 code; search is constrained to and .
Example:
with valid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_1_to_name|nv}}</nowiki>
→
with invalid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_1_to_name|xx}}</nowiki>
→
Same as iso_639_code_to_name
except that <{{var|code}}>
must be an ISO 639-2 code; search is constrained to and .
Example:
with valid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_2_to_name|apa}}</nowiki>
→
with invalid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_2_to_name|xxx}}</nowiki>
→
Same as iso_639_code_to_name
except that <{{var|code}}>
must be an ISO 639-2B code; search is constrained to and .
Example:
with valid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_2B_to_name|ice}}</nowiki>
→
with invalid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_2B_to_name|xxx}}</nowiki>
→
Same as iso_639_code_to_name
except that <{{var|code}}>
must be an ISO 639-3 code; search is constrained to and .
Example:
with valid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_3_to_name|nav}}</nowiki>
→
with invalid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_3_to_name|xxx}}</nowiki>
→
Same as iso_639_code_to_name
except that <{{var|code}}>
must be an ISO 639-5 code; search is constrained to and .
Example:
with valid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_5_to_name|apa}}</nowiki>
→
with invalid <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_code_5_to_name|xxx}}</nowiki>
→
Returns true
when <{{var|language name}}>
is found in one of the ISO 639-1, -2, -3, -5, or override tables; returns nil else.
Useage:
<nowiki>{{#invoke:ISO 639 name|iso_639_name_exists|</nowiki><{{var|language name}}>}}
Examples:
without required <{{var|language name}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_name_exists}}</nowiki>
→
with valid <{{var|language name}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_name_exists|french}}</nowiki>
→
with invalid <{{var|language name}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_name_exists|fr}}</nowiki>
→
Returns ISO 639 language code associated with <{{var|language name}}>
. May return an error message with or without a language name.
This function may not be particularly useful because, except for case, <{{var|language name}}>
must exactly match the name in the data tables.
Optional parameters:
<{{var|part}}>
(second positional parameter) – limits return to codes from the specified <{{var|part}}>
(1
, 2
, 3
, 5
), override table first then the appropriate data table; when not supplied, this function searches in order part 1 to part 5. The search stops when a match is found.
suppresses error messages
Examples:
without <{{var|part}}>
, with ISO 639-5 name:
<nowiki>{{#invoke:ISO 639 name|iso_639_name_to_code|North Germanic languages}}</nowiki>
→
with <{{var|part}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639_name_to_code|Navajo|2}}</nowiki>
→
When given an ISO 639 language code, return the associated language name; when given a language name, returns the associated ISO 639 language code. May return an error message with or without a language code/name.
This function may not be particularly useful because, except for case, a provided <{{var|language name}}>
must exactly match the name in the data tables.
Optional parameters:
<{{var|part}}>
(second positional parameter) – limits return to codes/names from the specified <{{var|part}}>
(1
, 2
, 3
, 5
), override table first then the appropriate data table; when not supplied, this function searches in order part 1 to part 5. The search stops when a match is found.
suppresses error messages
Examples:
without <{{var|part}}>
, with ISO 639-5 code:
<nowiki>{{#invoke:ISO 639 name|iso_639|gmq}}</nowiki>
→
without <{{var|part}}>
, with ISO 639-5 name:
<nowiki>{{#invoke:ISO 639 name|iso_639|North Germanic languages}}</nowiki>
→
with <{{var|part}}>
and <{{var|code}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639|nav|2}}</nowiki>
→
with <{{var|part}}>
and <{{var|name}}>
:
<nowiki>{{#invoke:ISO 639 name|iso_639|Navaho|2}}</nowiki>
→