模組:ISO 639 name/doc

来自Local Chinese Wikipedia

页面[[:Module:Message box/mbox.css|Module:Message box/mbox.css]]没有内容。

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转到导航 跳转到搜索

这是Module:ISO 639 name的文档页面

页面Module:Message box/mbox.css没有内容。

页面Module:Message box/mbox.css没有内容。

Module:ISO 639 name implements:


Data mapping[编辑]

For code-to-name mapping, this module uses data from:

For name-to-code mapping, this module uses data from:

<inputbox> bgcolor=transparent type=fulltext prefix=Module:ISO 639 name/ break=no width=22 searchbuttonlabel=Search /data </inputbox>

Testcases[编辑]

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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with valid <code>:
{{#invoke:ISO 639 name|iso_639_code_exists|nav}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with invalid <code>:
{{#invoke:ISO 639 name|iso_639_code_exists|xx}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with valid <code>:
{{#invoke:ISO 639 name|iso_639_code_to_name|nav}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with invalid <code>:
{{#invoke:ISO 639 name|iso_639_code_to_name|xx}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
linked:
{{#invoke:ISO 639 name|iso_639_code_to_name|nav|link=yes}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with invalid <code>:
{{#invoke:ISO 639 name|iso_639_code_1_to_name|xx}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with invalid <code>:
{{#invoke:ISO 639 name|iso_639_code_2_to_name|xxx}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with invalid <code>:
{{#invoke:ISO 639 name|iso_639_code_2B_to_name|xxx}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with invalid <code>:
{{#invoke:ISO 639 name|iso_639_code_3_to_name|xxx}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with invalid <code>:
{{#invoke:ISO 639 name|iso_639_code_5_to_name|xxx}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with valid <language name>:
{{#invoke:ISO 639 name|iso_639_name_exists|french}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with invalid <language name>:
{{#invoke:ISO 639 name|iso_639_name_exists|fr}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with <part>:
{{#invoke:ISO 639 name|iso_639_name_to_code|Navajo|2}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误: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}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with <part> and <code>:
{{#invoke:ISO 639 name|iso_639|nav|2}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found
with <part> and <name>:
{{#invoke:ISO 639 name|iso_639|Navaho|2}}package.lua第80行Lua错误:module 'Module:ISO 639 name/ISO 639 override' not found