Revision as of 20:41, 3 September 2024 editTrappist the monk (talk | contribs)Administrators479,591 edits →Two suggestions← Previous edit | Latest revision as of 19:00, 26 December 2024 edit undoNardog (talk | contribs)Edit filter helpers, Autopatrolled, Extended confirmed users, New page reviewers, Pending changes reviewers, Rollbackers, Template editors80,785 edits →Mono language issue: ReplyTag: Reply | ||
(28 intermediate revisions by 5 users not shown) | |||
Line 14: | Line 14: | ||
}} | }} | ||
{{archives|age=180|bot=Lowercase sigmabot III}} | {{archives|age=180|bot=Lowercase sigmabot III}} | ||
== Template-protected edit request on 18 December 2018 == | |||
{{edit template-protected|Template:ISO 639 name|answered=yes}} | |||
We received the folloing rewuest at the help desk: | |||
*please fix <nowiki>{{iso2language|lij}}</nowiki> with link to ]. thanks!!! --] (]) 14:53, 18 December 2018 (UTC) | |||
I checked at the ISO639 site: this is the correct mapping. please add: | |||
* lij --> ] ] (]) 16:08, 18 December 2018 (UTC) | |||
::] '''Already done'''<!-- Template:ETp --> Already done. Test: | |||
:::{{tlx|iso2language|lij}} | |||
::See rest of the discussion at ]. ] 🎷 <sup>'']'' | '']''</sup> 22:45, 19 December 2018 (UTC) | |||
== Mbo langues lead to the disambiguation page == | |||
Noticed that the mbo langues lead to the disambiguation page: | |||
* {{tlx|ISO 639 name|mbo|link{{=}}yes|_show_result=y}} - this is for ] | |||
* {{tlx|ISO 639 name|zmw|link{{=}}yes|_show_result=y}} - this is for ] | |||
⚫ | ] (]) 13: |
||
== Template broken (2024) == | == Template broken (2024) == | ||
Line 47: | Line 29: | ||
:If you want to create a shortcut (did you mean a redirect?) to {{tlx|ISO 639 name link}}, go ahead. | :If you want to create a shortcut (did you mean a redirect?) to {{tlx|ISO 639 name link}}, go ahead. | ||
:—] (]) 20:41, 3 September 2024 (UTC) | :—] (]) 20:41, 3 September 2024 (UTC) | ||
::I've just discovered {{tl|Llink}}, seems to be fine. Thanks anyway.-- ] (]) 05:15, 4 September 2024 (UTC) | |||
== Mono language issue == | |||
There is an issue with this language, see the following: | |||
* {{tlx|ISO 639 name|mnr|_show_result=yes}} | |||
* {{suppress categories|{{tlx|ISO 639 code|Mono|_show_result=yes}}}} | |||
⚫ | ] (]) 13:45, 27 October 2024 (UTC) | ||
:You must tell the template which of the four you want. The name must be exactly as it is listed in the ISO 639 data modules (for a list of them, see {{slink|Module:ISO_639_name#Data_mapping}}): | |||
:*<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 code|Mono (Democratic Republic of Congo)}}</syntaxhighlight> → {{ISO 639 code|Mono (Democratic Republic of Congo)}} | |||
:*<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 code|Mono (USA)}}</syntaxhighlight> → {{ISO 639 code|Mono (USA)}} | |||
:*<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 code|Mono (Cameroon)}}</syntaxhighlight> → {{ISO 639 code|Mono (Cameroon)}} | |||
:*<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 code|Mono (Solomon Islands)}}</syntaxhighlight> → {{ISO 639 code|Mono (Solomon Islands)}} | |||
:—] (]) 14:17, 27 October 2024 (UTC) | |||
::Ah, thanks for reminding me of this. Do you have any idea why {{tlx|IPA|mnr|test}} gets the non-disambiguated name (])? ] (]) 14:26, 27 October 2024 (UTC) | |||
:::To get the language name, ] uses: | |||
::::<syntaxhighlight lang="wikitext" inline="1">{{lang|fn=name_from_tag|mnr}}</syntaxhighlight> → {{lang|fn=name_from_tag|mnr}} (]) | |||
:::] always strips IANA/ISO disambiguators. Module:IPA might do better to fetch the name from ] using the {{para|raw|yes}} parameter: | |||
::::<syntaxhighlight lang="wikitext" inline="1">{{#invoke:ISO 639 name|iso_639_code_to_name|mnr|raw=yes}}</syntaxhighlight> → {{#invoke:ISO 639 name|iso_639_code_to_name|mnr|raw=yes}} | |||
:::also available to the template: | |||
::::<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 name|mnr|raw=yes}}</syntaxhighlight> → {{ISO 639 name|mnr|raw=yes}} | |||
:::—] (]) 15:00, 27 October 2024 (UTC) | |||
::::Is <code>_iso_639_code_to_name (frame)</code> meant as a module entry point also? It currently doesn't work like <code>_iso_639_name_to_code (args)</code>. ] (]) 15:29, 27 October 2024 (UTC) | |||
:::::Not clear to me why the code is written as it is. Usually, when I use an underscore-prefixed function name, that name (if exported) is for access from another module. <syntaxhighlight lang="lua" inline="1">_iso_639_code_to_name (frame)</syntaxhighlight> is not exported and because it accepts <code>frame</code> as a variable, would be a template access point. Mayhaps I got started on creating module access points and got side-tracked? Don't know, I'll give some thought to fixing that. | |||
:::::—] (]) 16:43, 27 October 2024 (UTC) | |||
::::{{re|Trappist the monk}} That doesn't work because the input can be an IETF tag. Barring an exposed function to fetch the language name, the article to link, the raw name, and the canonical/sanitized tag from an IETF tag all at once (which would be great), is there no equivalent to {{ml|Lang|category_from_tag}} except it returns just the language part, i.e. without "Articles containing" or "-language text"? ] (]) 05:27, 26 December 2024 (UTC) | |||
:::::What do you mean by: {{tq|the input can be an IETF tag}}? {{tlx|ISO 639 name}} supports ISO 639-1, -2, -3, and -5 language tags only. It does not support IETF language tags. The only category link emitted by {{tld|ISO 639 name}} is {{cl|ISO 639 name template errors}}; there is no other categorization. | |||
:::::—] (]) 15:20, 26 December 2024 (UTC) | |||
::::::You said {{tq|Module:IPA might do better to fetch the name from ] using the {{para|raw|yes}} parameter}}. I'm pointing out that doesn't work because e.g. {{tlx|IPA|pt-BR|...}} needs to show the same label as {{tlx|langx|pt-BR|...}} (which, if used in an article, puts it in ] rather than ]). ] (]) 15:28, 26 December 2024 (UTC) | |||
:::::::That was for the rare case of Mono, a name shared by several different languages, each with its own language tag. If {{tlx|IPA}} and {{tlx|Langx}} {{em|must}} show the same label then {{tlx|ISO 639 name}} is not the correct tool for {{tld|IPA}}. | |||
::::::: | |||
:::::::How {{tld|langx}} categorizes out-of-scope for {{tld|ISO 639 name}}. | |||
::::::: | |||
:::::::This is the wrong venue to be discussing changes to Module:Lang. Certainly ] can be tweaked so that <code>name_from_tag()</code> supports {{para|raw|yes}}. It would be up to ] to decide what it does with that parameter. | |||
:::::::—] (]) 16:42, 26 December 2024 (UTC) | |||
::::::::You're telling me. I'm pointing out you and Gonnym were missing a bigger picture when suggesting Module:IPA use this module. | |||
::::::::So is there no exposed function that converts e.g. <code>pt-BR</code> to "Brazilian Portuguese" and <code>mnr</code> to "Mono (USA)", i.e. what {{tlf|lang(x)}} does to generate categories? Can you make one? ] (]) 16:52, 26 December 2024 (UTC) | |||
:::::::::There is no support in ] for IETF language tags because IETF is not ISO 639. Module:ISO 639 name will return a language name from an ISO 639 language tag: | |||
::::::::::<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 name|pt-BR}}</syntaxhighlight> → {{ISO 639 name|pt-BR}} | |||
::::::::::<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 name|mnr}}</syntaxhighlight> → {{ISO 639 name|mnr}} | |||
:::::::::and to get the name with disambiguator (if present): | |||
::::::::::<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 name|mnr|raw=yes}}</syntaxhighlight> → {{ISO 639 name|mnr|raw=yes}} | |||
:::::::::—] (]) 17:16, 26 December 2024 (UTC) | |||
::::::::::Again, I'm only asking here because you were already having a relevant discussion here. I'm not asking if ''this'' module has it, I'm asking if ''any'' module does. ] (]) 17:19, 26 December 2024 (UTC) | |||
:::::::::::Then Module:Lang should also have a {{para|raw|yes}} option to get the full name. ] (]) 17:44, 26 December 2024 (UTC) | |||
::::::::::::] but that was apparently ignored. I've added it: | |||
::::::::::::*<syntaxhighlight lang="wikitext" inline="1">{{lang|fn=name_from_tag|mnr}}</syntaxhighlight> → {{lang|fn=name_from_tag|mnr}} | |||
::::::::::::*<syntaxhighlight lang="wikitext" inline="1">{{lang|fn=name_from_tag|mnr|raw=yes}}</syntaxhighlight> → {{lang|fn=name_from_tag|mnr|raw=yes}} | |||
::::::::::::—] (]) 18:10, 26 December 2024 (UTC) | |||
:::::::::::::If that was meant to me, I wasn't ignoring you, I was agreeing with you. ] (]) 18:27, 26 December 2024 (UTC) | |||
::::::::::::::Twas meant for you; just noting that Editor Nardog had apparently ignored that part of my post. | |||
::::::::::::::—] (]) 18:59, 26 December 2024 (UTC) | |||
:::::::::::::::I wasn't ignoring it, I just didn't realize that was precisely what I was asking! ] (]) 19:00, 26 December 2024 (UTC) |
Latest revision as of 19:00, 26 December 2024
Template:ISO 639 name is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. This template does not have a testcases subpage. You can create the testcases subpage here. |
This template does not require a rating on Misplaced Pages's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
Archives | |
|
|
This page has archives. Sections older than 180 days may be automatically archived by Lowercase sigmabot III when more than 3 sections are present. |
Template broken (2024)
Template looks like it's broken. It's giving the following as an output: Lua error in package.lua at line 80: module 'Module:Language/data/ISO 639 deprecated' not found.
HapHaxion (talk / contribs) 14:59, 11 July 2024 (UTC)
Two suggestions
Hi, is it possible to add two features?
- a link to Mozambican Portuguese and other variants of that language;
- a shortcut to {{ISO 639 name link}}
Thanks.-- Carnby (talk) 20:12, 3 September 2024 (UTC)
- ISO 639 does not recognize Mozambican Portuguese. Not in ISO 639? not going to be added to a template specifically for ISO 639 recognized languages.
- If you want to create a shortcut (did you mean a redirect?) to
{{ISO 639 name link}}
, go ahead. - —Trappist the monk (talk) 20:41, 3 September 2024 (UTC)
- I've just discovered {{Llink}}, seems to be fine. Thanks anyway.-- Carnby (talk) 05:15, 4 September 2024 (UTC)
Mono language issue
There is an issue with this language, see the following:
{{ISO 639 name|mnr}}
→ Mono{{ISO 639 code|Mono}}
→ error: Mono not found in ISO 639-1, -2, -2B, -3, -5 list (help)
Gonnym (talk) 13:45, 27 October 2024 (UTC)
- You must tell the template which of the four you want. The name must be exactly as it is listed in the ISO 639 data modules (for a list of them, see Module:ISO 639 name § Data mapping):
{{ISO 639 code|Mono (Democratic Republic of Congo)}}
→ mnh{{ISO 639 code|Mono (USA)}}
→ mnr{{ISO 639 code|Mono (Cameroon)}}
→ mru{{ISO 639 code|Mono (Solomon Islands)}}
→ mte
- —Trappist the monk (talk) 14:17, 27 October 2024 (UTC)
- Ah, thanks for reminding me of this. Do you have any idea why
{{IPA|mnr|test}}
gets the non-disambiguated name (Category:Pages with Mono IPA)? Gonnym (talk) 14:26, 27 October 2024 (UTC)- To get the language name, Module:IPA uses:
{{lang|fn=name_from_tag|mnr}}
→ Mono (lines 65–72)
- Module:Lang always strips IANA/ISO disambiguators. Module:IPA might do better to fetch the name from Module:ISO 639 name using the
|raw=yes
parameter:{{#invoke:ISO 639 name|iso_639_code_to_name|mnr|raw=yes}}
→ Mono (USA)
- also available to the template:
{{ISO 639 name|mnr|raw=yes}}
→ Mono (USA)
- —Trappist the monk (talk) 15:00, 27 October 2024 (UTC)
- Is
_iso_639_code_to_name (frame)
meant as a module entry point also? It currently doesn't work like_iso_639_name_to_code (args)
. Gonnym (talk) 15:29, 27 October 2024 (UTC)- Not clear to me why the code is written as it is. Usually, when I use an underscore-prefixed function name, that name (if exported) is for access from another module.
_iso_639_code_to_name (frame)
is not exported and because it acceptsframe
as a variable, would be a template access point. Mayhaps I got started on creating module access points and got side-tracked? Don't know, I'll give some thought to fixing that. - —Trappist the monk (talk) 16:43, 27 October 2024 (UTC)
- Not clear to me why the code is written as it is. Usually, when I use an underscore-prefixed function name, that name (if exported) is for access from another module.
- @Trappist the monk: That doesn't work because the input can be an IETF tag. Barring an exposed function to fetch the language name, the article to link, the raw name, and the canonical/sanitized tag from an IETF tag all at once (which would be great), is there no equivalent to {{#invoke:Lang|category_from_tag}} except it returns just the language part, i.e. without "Articles containing" or "-language text"? Nardog (talk) 05:27, 26 December 2024 (UTC)
- What do you mean by:
the input can be an IETF tag
?{{ISO 639 name}}
supports ISO 639-1, -2, -3, and -5 language tags only. It does not support IETF language tags. The only category link emitted by{{ISO 639 name}}
is Category:ISO 639 name template errors; there is no other categorization. - —Trappist the monk (talk) 15:20, 26 December 2024 (UTC)
- You said
Module:IPA might do better to fetch the name from Module:ISO 639 name using the
. I'm pointing out that doesn't work because e.g.|raw=yes
parameter{{IPA|pt-BR|...}}
needs to show the same label as{{langx|pt-BR|...}}
(which, if used in an article, puts it in Category:Articles containing Brazilian Portuguese-language text rather than Category:Articles containing Portuguese-language text). Nardog (talk) 15:28, 26 December 2024 (UTC)- That was for the rare case of Mono, a name shared by several different languages, each with its own language tag. If
{{IPA}}
and{{Langx}}
must show the same label then{{ISO 639 name}}
is not the correct tool for{{IPA}}
. - How
{{langx}}
categorizes out-of-scope for{{ISO 639 name}}
. - This is the wrong venue to be discussing changes to Module:Lang. Certainly Module:Lang can be tweaked so that
name_from_tag()
supports|raw=yes
. It would be up to Module:IPA to decide what it does with that parameter. - —Trappist the monk (talk) 16:42, 26 December 2024 (UTC)
- You're telling me. I'm pointing out you and Gonnym were missing a bigger picture when suggesting Module:IPA use this module.
- So is there no exposed function that converts e.g.
pt-BR
to "Brazilian Portuguese" andmnr
to "Mono (USA)", i.e. what {{lang(x)}} does to generate categories? Can you make one? Nardog (talk) 16:52, 26 December 2024 (UTC)- There is no support in Module:ISO 639 name for IETF language tags because IETF is not ISO 639. Module:ISO 639 name will return a language name from an ISO 639 language tag:
{{ISO 639 name|pt-BR}}
→ Portuguese error: pt-BR is an IETF tag (help){{ISO 639 name|mnr}}
→ Mono
- and to get the name with disambiguator (if present):
{{ISO 639 name|mnr|raw=yes}}
→ Mono (USA)
- —Trappist the monk (talk) 17:16, 26 December 2024 (UTC)
- Again, I'm only asking here because you were already having a relevant discussion here. I'm not asking if this module has it, I'm asking if any module does. Nardog (talk) 17:19, 26 December 2024 (UTC)
- Then Module:Lang should also have a
|raw=yes
option to get the full name. Gonnym (talk) 17:44, 26 December 2024 (UTC)- Which I suggested could be done but that was apparently ignored. I've added it:
{{lang|fn=name_from_tag|mnr}}
→ Mono{{lang|fn=name_from_tag|mnr|raw=yes}}
→ Mono (USA)
- —Trappist the monk (talk) 18:10, 26 December 2024 (UTC)
- If that was meant to me, I wasn't ignoring you, I was agreeing with you. Gonnym (talk) 18:27, 26 December 2024 (UTC)
- Twas meant for you; just noting that Editor Nardog had apparently ignored that part of my post.
- —Trappist the monk (talk) 18:59, 26 December 2024 (UTC)
- I wasn't ignoring it, I just didn't realize that was precisely what I was asking! Nardog (talk) 19:00, 26 December 2024 (UTC)
- If that was meant to me, I wasn't ignoring you, I was agreeing with you. Gonnym (talk) 18:27, 26 December 2024 (UTC)
- Which I suggested could be done but that was apparently ignored. I've added it:
- Then Module:Lang should also have a
- Again, I'm only asking here because you were already having a relevant discussion here. I'm not asking if this module has it, I'm asking if any module does. Nardog (talk) 17:19, 26 December 2024 (UTC)
- There is no support in Module:ISO 639 name for IETF language tags because IETF is not ISO 639. Module:ISO 639 name will return a language name from an ISO 639 language tag:
- That was for the rare case of Mono, a name shared by several different languages, each with its own language tag. If
- You said
- What do you mean by:
- Is
- To get the language name, Module:IPA uses:
- Ah, thanks for reminding me of this. Do you have any idea why