ಮೋಡ್ಯೂಲ್:ISO 639 name/doc
This is the documentation page for ಮೋಡ್ಯೂಲ್:ISO 639 name
This module depends on the following other modules: |
This Lua module is used on many pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
Module:ISO 639 name implements:
{{ISO 639 name}}
{{Lang2iso}}
Data mapping
[ಸಂಪೊಲಿಪುಲೆ]For code-to-name mapping, this module uses data from:
- Module:ISO 639 name/ISO 639-1 – from IANA language-subtag-registry file; this data used only for ISO 639-1 language codes / names listed there
- Module:ISO 639 name/ISO 639-2 – from Codes for the Representation of Names of Languages
- Module:ISO 639 name/ISO 639-2B – from Codes for the Representation of Names of Languages
- Module:ISO 639 name/ISO 639-3 – from sil.org UTF-8 Complete Code Tables Set
- Module:ISO 639 name/ISO 639-5 – from Codes for the Representation of Names of Languages Part 5
- Module:ISO 639 name/ISO 639 deprecated – from ISO 639-2/RA Change Notice and ISO 639-5 Change Notice includes:
- Module:ISO 639 name/ISO 639-3 (dep) – from sil.org UTF-8 Complete Code Tables Set (Retirements)
- Module:ISO 639 name/ISO 639 override – code to name mapping where the name is different from the name in the ISO 639 standard
For name-to-code mapping, this module uses data from:
- Module:ISO 639 name/ISO 639 name to code – names and codes extracted from the code-to-name data set above
Testcases
[ಸಂಪೊಲಿಪುಲೆ]- Module:ISO 639 name/testcases (run)
- code_to_name()
- Module:ISO 639 name/testcases/ISO 639-1 name from code (run)
- Module:ISO 639 name/testcases/ISO 639-2 name from code (run)
- Module:ISO 639 name/testcases/ISO 639-3-1 name from code (A–H) (run)
- Module:ISO 639 name/testcases/ISO 639-3-2 name from code (I–N) (run)
- Module:ISO 639 name/testcases/ISO 639-3-3 name from code (O–Z) (run)
- Module:ISO 639 name/testcases/ISO 639-5 name from code (run)
- Module:ISO 639 name/testcases/ISO 639 deprecated name from code (run)
- name_to_code()
- Module:ISO 639 name/testcases/ISO 639-1 code from name (run)
- Module:ISO 639 name/testcases/ISO 639-2 code from name (run)
- Module:ISO 639 name/testcases/ISO 639-3-1 code from name (A–H) (run)
- Module:ISO 639 name/testcases/ISO 639-3-2 code from name (I–N) (run)
- Module:ISO 639 name/testcases/ISO 639-3-3 code from name (O–Z) (run)
- Module:ISO 639 name/testcases/ISO 639-5 code from name (run)
- Module:ISO 639 name/testcases/ISO 639 deprecated code from name (run)
Tracking categories
[ಸಂಪೊಲಿಪುಲೆ]iso_639_code_exists
[ಸಂಪೊಲಿಪುಲೆ]Returns true
when <code>
is found in one of the ISO 639-1, -2, -3, -5, or override tables; returns nil else.
Useage:
{{#invoke:ISO 639 name|iso_639_code_exists|<code>}}
Examples:
- without required
<code>
:{{#invoke:ISO 639 name|iso_639_code_exists}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with valid
<code>
:{{#invoke:ISO 639 name|iso_639_code_exists|nav}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<code>
:{{#invoke:ISO 639 name|iso_639_code_exists|xx}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
iso_639_code_to_name
[ಸಂಪೊಲಿಪುಲೆ]Returns language name associated with <code>
. May return an error message with or without a language name.
Optional parameters:
|hide-err=yes
: suppresses error messages|link=yes
: creates link to en.wiki article about the language|label=<label text>
– requires|link=yes
; label for the language-name link:[[<language name> language|<label text>]]
|raw=yes
: queries part tables only; returns language name as defined in the base data tables without the removal of disambiguation information
Examples:
- without required
<code>
:{{#invoke:ISO 639 name|iso_639_code_to_name}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with valid
<code>
:{{#invoke:ISO 639 name|iso_639_code_to_name|nav}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<code>
:{{#invoke:ISO 639 name|iso_639_code_to_name|xx}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<code>
(IETF language tag):{{#invoke:ISO 639 name|iso_639_code_to_name|nv-Latn}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<code>
, error message suppressed:{{#invoke:ISO 639 name|iso_639_code_to_name|nv-Latn|hide-err=yes}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- linked:
{{#invoke:ISO 639 name|iso_639_code_to_name|nav|link=yes}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- linked with alternate spelling:
{{#invoke:ISO 639 name|iso_639_code_to_name|nav|link=yes|label=Navaho}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- ISO 639-1 code
el
is normally overridden by a setting in Module:ISO 639 name/ISO_639_override:{{#invoke:ISO 639 name|iso_639_code_to_name|el}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- ISO 639-1 code
el
with override suppressed:{{#invoke:ISO 639 name|iso_639_code_to_name|el|raw=yes}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- ISO 639-3 code
ina
name has disambiguation that is normally suppressed:{{#invoke:ISO 639 name|iso_639_code_to_name|ina}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- ISO 639-3 code
ina
with disambiguation:{{#invoke:ISO 639 name|iso_639_code_to_name|ina|raw=yes}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
iso_639_code_1_to_name
[ಸಂಪೊಲಿಪುಲೆ]Same as iso_639_code_to_name
except that <code>
must be an ISO 639-1 code; search is constrained to Module:ISO 639 name/ISO 639 override and Module:ISO 639 name/ISO 639-1.
Example:
- with valid
<code>
:{{#invoke:ISO 639 name|iso_639_code_1_to_name|nv}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<code>
:{{#invoke:ISO 639 name|iso_639_code_1_to_name|xx}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
iso_639_code_2_to_name
[ಸಂಪೊಲಿಪುಲೆ]Same as iso_639_code_to_name
except that <code>
must be an ISO 639-2 code; search is constrained to Module:ISO 639 name/ISO 639 override and Module:ISO 639 name/ISO 639-2.
Example:
- with valid
<code>
:{{#invoke:ISO 639 name|iso_639_code_2_to_name|apa}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<code>
:{{#invoke:ISO 639 name|iso_639_code_2_to_name|xxx}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
iso_639_code_2B_to_name
[ಸಂಪೊಲಿಪುಲೆ]Same as iso_639_code_to_name
except that <code>
must be an ISO 639-2B code; search is constrained to Module:ISO 639 name/ISO 639 override and Module:ISO 639 name/ISO 639-2B.
Example:
- with valid
<code>
:{{#invoke:ISO 639 name|iso_639_code_2B_to_name|ice}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<code>
:{{#invoke:ISO 639 name|iso_639_code_2B_to_name|xxx}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
iso_639_code_3_to_name
[ಸಂಪೊಲಿಪುಲೆ]Same as iso_639_code_to_name
except that <code>
must be an ISO 639-3 code; search is constrained to Module:ISO 639 name/ISO 639 override and Module:ISO 639 name/ISO 639-3.
Example:
- with valid
<code>
:{{#invoke:ISO 639 name|iso_639_code_3_to_name|nav}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<code>
:{{#invoke:ISO 639 name|iso_639_code_3_to_name|xxx}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
iso_639_code_5_to_name
[ಸಂಪೊಲಿಪುಲೆ]Same as iso_639_code_to_name
except that <code>
must be an ISO 639-5 code; search is constrained to Module:ISO 639 name/ISO 639 override and Module:ISO 639 name/ISO 639-5.
Example:
- with valid
<code>
:{{#invoke:ISO 639 name|iso_639_code_5_to_name|apa}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<code>
:{{#invoke:ISO 639 name|iso_639_code_5_to_name|xxx}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
iso_639_name_exists
[ಸಂಪೊಲಿಪುಲೆ]Returns true
when <language name>
is found in one of the ISO 639-1, -2, -3, -5, or override tables; returns nil else.
Useage:
{{#invoke:ISO 639 name|iso_639_name_exists|<language name>}}
Examples:
- without required
<language name>
:{{#invoke:ISO 639 name|iso_639_name_exists}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with valid
<language name>
:{{#invoke:ISO 639 name|iso_639_name_exists|french}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with invalid
<language name>
:{{#invoke:ISO 639 name|iso_639_name_exists|fr}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
iso_639_name_to_code
[ಸಂಪೊಲಿಪುಲೆ]Returns ISO 639 language code associated with <language name>
. May return an error message with or without a language name.
This function may not be particularly useful because, except for case, <language name>
must exactly match the name in the data tables.
Optional parameters:
<part>
(second positional parameter) – limits return to codes from the specified<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.|hide-err=yes
: suppresses error messages
Examples:
- without
<part>
, with ISO 639-5 name:{{#invoke:ISO 639 name|iso_639_name_to_code|North Germanic languages}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with
<part>
:{{#invoke:ISO 639 name|iso_639_name_to_code|Navajo|2}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
iso_639
[ಸಂಪೊಲಿಪುಲೆ]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 <language name>
must exactly match the name in the data tables.
Optional parameters:
<part>
(second positional parameter) – limits return to codes/names from the specified<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.|hide-err=yes
: suppresses error messages
Examples:
- without
<part>
, with ISO 639-5 code:{{#invoke:ISO 639 name|iso_639|gmq}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- without
<part>
, with ISO 639-5 name:{{#invoke:ISO 639 name|iso_639|North Germanic languages}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with
<part>
and<code>
:{{#invoke:ISO 639 name|iso_639|nav|2}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.
- with
<part>
and<name>
:{{#invoke:ISO 639 name|iso_639|Navaho|2}}
→ Lua error in package.lua at line 80: module 'Module:ISO 639 name/ISO 639 override' not found.