Module:ISO 639 name/doc
| Ang Lua module na ito ay ginagamit ng maraming pahina at posibleng mapapansin agad ang mga pagbabago. Pakisubok muna ang mga balak na pagbabago sa subpahina ng module na /burador o /pagsubok, o sa sarili mong module sandbox. Pag-usapan muna ang mga balak na pagbabago sa pahina ng usapan bago gawin ito. |
Module:ISO 639 name implements:
{{ISO 639 name}}{{Lang2iso}}
Data mapping
For code-to-name mapping, this module uses data from:
- Module:Language/data/ISO 639-1 – from IANA language-subtag-registry file; this data used only for ISO 639-1 language codes / names listed there
- Module:Language/data/ISO 639-2 – from Codes for the Representation of Names of Languages
- Module:Language/data/ISO 639-2B – from Codes for the Representation of Names of Languages
- Module:Language/data/ISO 639-3 – from sil.org UTF-8 Complete Code Tables Set
- Module:Language/data/ISO 639-5 – from Codes for the Representation of Names of Languages Part 5
- Module:Language/data/ISO 639 deprecated – from ISO 639-2/RA Change Notice and ISO 639-5 Change Notice includes:
- Module:Language/data/ISO 639-3 (dep) – from sil.org UTF-8 Complete Code Tables Set (Retirements)
- Module:Language/data/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:Language/data/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 code to name (run)
- Module:ISO 639 name/testcases/ISO 639-2 code to name (run)
- Module:ISO 639 name/testcases/ISO 639-3-1 code to name (A–H) (run)
- Module:ISO 639 name/testcases/ISO 639-3-2 code to name (I–N) (run)
- Module:ISO 639 name/testcases/ISO 639-3-3 code to name (O–Z) (run)
- Module:ISO 639 name/testcases/ISO 639-5 code to name (run)
- Module:ISO 639 name/testcases/ISO 639 deprecated code to name (run)
- name_to_code()
- Module:ISO 639 name/testcases/ISO 639-1 name_to_code (run)
- Module:ISO 639 name/testcases/ISO 639-2 name_to_code (run)
- Module:ISO 639 name/testcases/ISO 639-3-1 name_to_code (A–H) (run)
- Module:ISO 639 name/testcases/ISO 639-3-2 name_to_code (I–N) (run)
- Module:ISO 639 name/testcases/ISO 639-3-3 name_to_code (O–Z) (run)
- Module:ISO 639 name/testcases/ISO 639-5 name_to_code (run)
- Module:ISO 639 name/testcases/ISO 639 deprecated name_to_code (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}}→
- with valid
<code>:{{#invoke:ISO 639 name|iso_639_code_exists|nav}}→ true
- with invalid
<code>:{{#invoke:ISO 639 name|iso_639_code_exists|xx}}→
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}}→ error: ISO 639 code is required (help)
- with valid
<code>:{{#invoke:ISO 639 name|iso_639_code_to_name|nav}}→ Navajo
- with invalid
<code>:{{#invoke:ISO 639 name|iso_639_code_to_name|xx}}→ error: xx not found in ISO 639-1, -2, -2B, -3, -5 list (help)
- with invalid
<code>(IETF language tag):{{#invoke:ISO 639 name|iso_639_code_to_name|nv-Latn}}→ Navajo error: nv-Latn is an IETF tag (help)
- with invalid
<code>, error message suppressed:{{#invoke:ISO 639 name|iso_639_code_to_name|nv-Latn|hide-err=yes}}→ Navajo
- linked:
{{#invoke:ISO 639 name|iso_639_code_to_name|nav|link=yes}}→ Navajo
- linked with alternate spelling:
{{#invoke:ISO 639 name|iso_639_code_to_name|nav|link=yes|label=Navaho}}→ Navaho
- ISO 639-1 code
elis normally overridden by a setting in Module:Language/data/ISO_639_override:{{#invoke:ISO 639 name|iso_639_code_to_name|el}}→ Greek
- ISO 639-1 code
elwith override suppressed:{{#invoke:ISO 639 name|iso_639_code_to_name|el|raw=yes}}→ Modern Greek (1453-)
- ISO 639-3 code
inaname has disambiguation that is normally suppressed:{{#invoke:ISO 639 name|iso_639_code_to_name|ina}}→ Interlingua
- ISO 639-3 code
inawith disambiguation:{{#invoke:ISO 639 name|iso_639_code_to_name|ina|raw=yes}}→ Interlingua (International Auxiliary Language Association)
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:Language/data/ISO 639 override and Module:Language/data/ISO 639-1.
Example:
- with valid
<code>:{{#invoke:ISO 639 name|iso_639_code_1_to_name|nv}}→ Navajo
- with invalid
<code>:{{#invoke:ISO 639 name|iso_639_code_1_to_name|xx}}→ error: xx not found in ISO 639-1 list (help)
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:Language/data/ISO 639 override and Module:Language/data/ISO 639-2.
Example:
- with valid
<code>:{{#invoke:ISO 639 name|iso_639_code_2_to_name|apa}}→ Apache languages
- with invalid
<code>:{{#invoke:ISO 639 name|iso_639_code_2_to_name|xxx}}→ error: xxx not found in ISO 639-2 list (help)
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:Language/data/ISO 639 override and Module:Language/data/ISO 639-2B.
Example:
- with valid
<code>:{{#invoke:ISO 639 name|iso_639_code_2B_to_name|ice}}→ Icelandic
- with invalid
<code>:{{#invoke:ISO 639 name|iso_639_code_2B_to_name|xxx}}→ error: xxx not found in ISO 639-2B list (help)
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:Language/data/ISO 639 override and Module:Language/data/ISO 639-3.
Example:
- with valid
<code>:{{#invoke:ISO 639 name|iso_639_code_3_to_name|nav}}→ Navaho
- with invalid
<code>:{{#invoke:ISO 639 name|iso_639_code_3_to_name|xxx}}→ error: xxx not found in ISO 639-3 list (help)
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:Language/data/ISO 639 override and Module:Language/data/ISO 639-5.
Example:
- with valid
<code>:{{#invoke:ISO 639 name|iso_639_code_5_to_name|apa}}→ Apache languages
- with invalid
<code>:{{#invoke:ISO 639 name|iso_639_code_5_to_name|xxx}}→ error: xxx not found in ISO 639-5 list (help)
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}}→
- with valid
<language name>:{{#invoke:ISO 639 name|iso_639_name_exists|french}}→ Kamalian ng Lua na sa package.lua na nasa linyang 80: module 'Module:Language/data/ISO 639 name to code' not found.
- with invalid
<language name>:{{#invoke:ISO 639 name|iso_639_name_exists|fr}}→ Kamalian ng Lua na sa package.lua na nasa linyang 80: module 'Module:Language/data/ISO 639 name to code' 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}}→ Kamalian ng Lua na sa package.lua na nasa linyang 80: module 'Module:Language/data/ISO 639 name to code' not found.
- with
<part>:{{#invoke:ISO 639 name|iso_639_name_to_code|Navajo|2}}→ Kamalian ng Lua na sa package.lua na nasa linyang 80: module 'Module:Language/data/ISO 639 name to code' 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}}→ North Germanic languages
- without
<part>, with ISO 639-5 name:{{#invoke:ISO 639 name|iso_639|North Germanic languages}}→ Kamalian ng Lua na sa package.lua na nasa linyang 80: module 'Module:Language/data/ISO 639 name to code' not found.
- with
<part>and<code>:{{#invoke:ISO 639 name|iso_639|nav|2}}→ Navajo
- with
<part>and<name>:{{#invoke:ISO 639 name|iso_639|Navaho|2}}→ Kamalian ng Lua na sa package.lua na nasa linyang 80: module 'Module:Language/data/ISO 639 name to code' not found.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.