Template talk:R from alternative language

Supporting multiple languages

[edit]

I think it would make sense to support multiple languages within one template use (rather than forcing the use of multiple instances of the template), as it's easier to parse. I'll draft something to support this, as it should be quite a simple job. Theknightwho (talk) 23:36, 19 July 2025 (UTC)[reply]

The template does not recognize English varieties

[edit]

As of writing this Space Opera TheaterSpace Opera Theater (permalink) is a member of Category:Redirects from non-English-language terms. This is because the "from" language is "en-us" but the template does not account for this. While this specific redirect can be fixed by changing "en-us" to "en" I still think the underlying bug should be fixed as well. Warudo (talk) 16:37, 23 September 2025 (UTC)[reply]

To editor Warudo: have the various forms of English each been given its own ISO 639-1 code? This template was formed to recognize only those languages that have ISO codes. As far as I know, "en" is an ISO code; is "en-us" an ISO code? P.I. Ellsworth , ed. – welcome! – 16:47, 23 September 2025 (UTC)[reply]
@Paine Ellsworth The template also supports IETF language tags according to its documentation Entries in those categories should be placed into more specific language categories when the "from" and "to" languages are known by using ISO 639 codes or appropriate IETF language tags, such as "en" for English, "la" for Latin, "en-au" for Australian English (see code list). This is a feature that should work correctly according to the docs but doesn't. Warudo (talk) 17:01, 23 September 2025 (UTC)[reply]
That was added to the /doc in 2018 as "wishful thinking" and was found to be too complicated for an already too complicated template. It should have been removed from the documentation long ago, so I will do so now. P.I. Ellsworth , ed. – welcome! – 17:09, 23 September 2025 (UTC)[reply]
I don't agree with that removal. IETF language tags work fine in other cases, like in Laiki EnotitaLaiki Enotita which is tagged with "el-latn" and correctly placed in Category:Redirects from Greek-language terms. I use them pretty often with this template because I know they work. The template should be fixed to handle English varieties instead. Warudo (talk) 17:13, 23 September 2025 (UTC)[reply]
The template is not broken. There must be a category that matches the language tag because this code:
{{#if:{{{1|}}}{{{from|}}}{{{lang|}}}
 | [[Category:Redirects from {{#ifexist:Category:Redirects from {{#invoke:Lang|name_from_tag|{{{1|{{{from|{{{lang|}}}}}}}}}}}-language terms
  | {{#invoke:Lang|name_from_tag|{{{1|{{{from|{{{lang|}}}}}}}}}}}
  | non-English
 }}-language terms]]
 | {{#ifeq:{{SUBPAGENAME}}|sandbox||[[Category:Redirects from undetermined-language terms]]
  }}
is looking for:
[[:Category:Redirects from {{#invoke:Lang|name_from_tag|en-us}}-language terms]]Category:Redirects from American English-language terms
create the category.
Trappist the monk (talk) 17:20, 23 September 2025 (UTC)[reply]
@Trappist the monk The fallback in case the category does not exist should have been to place the page in Category:Redirects from English-language terms because "en-us" starts with "en-" which shows its English. The fact that the page ended up in Category:Redirects from non-English-language terms is a bug. Warudo (talk) 17:23, 23 September 2025 (UTC)[reply]
Also, I created the category based on Category:Redirects from Australian English-language terms but they are both under Category:Redirects from English-language terms so something is still wrong. Warudo (talk) 17:29, 23 September 2025 (UTC)Nevermind, that's an easy fix Warudo (talk) 17:42, 23 September 2025 (UTC)[reply]