Template talk:R from alternative language/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1

Renaming

This template should be called "R from alternative language", for two reasons: 1) It's incorrect grammar 2) It's confusing - some redirect templates use alternative, others use alternate. ··gracefool | 07:08, 16 Jun 2005 (UTC)

Usage

For future reference, does this template cover non-romanized redirects (ie, kanji)? --InShaneee 20:43, 21 April 2006 (UTC)

  • It probably should, in my opinion. User:Ceyockey (talk to me) 23:18, 21 April 2006 (UTC)

Language parameters

I suggest that there be two parameters for this template specifying which alternative language is meant.

There are subcategories of Category:Redirects from alternative languages for 19 languages already. One, German, has a template for the purpose ({{R from German}}) but the others are manually populated. Adding a language parameter would make this easier and encourage further categorization.

It would work like this. On a redirect page, say Γαλλικό Κόμμα, an editor would write {{R from alternative language|el}}. The template would contain a mapping of language codes to categories, and it would determine that el = Category:Redirects from Greek-language terms and put it in that category. Redirects without parameters could be put into a category "Redirects from unspecified alternative languages".

Redirects from English to another language (e.g. Polish 1st Light Cavalry Regiment of the Imperial Guard) would get {{R from alternative language||fr}} and go into e.g. "Redirects to French-language terms". If there is a redirect from one language to another, neither of which is English, that would be {{R from alternative language|<from>|<to>}} and it would go into the two appropriate categories.

If this gains consensus, it could be useful to have a bot go through the pages in the specific language categories to convert them to this system. 155.33.149.25 (talk) 17:00, 19 September 2011 (UTC)

I think this is a good idea and the coding would be pretty easy to implement. I think the bot could identify some but probably not all, which in my opinion is ok. --Kumioko (talk) 12:57, 21 September 2011 (UTC)
One standardization and one new idea:
  1. The names of the language subcategories mostly currently follow the format "Redirects from ⟨language⟩ terms", where ⟨language⟩ is the name of the language, suffixing "-language" if ambiguous; e.g. "Korean-language" or "Scottish Gaelic". Is there any reason not to continue this system? Should the current categories be moved? (I think so.)
  2. It is worth specifying transliteration system in this template, along the lines of {{R from Wade-Giles}}, e.g. {{R from alternative language|zh||Wade-Giles}} or {{R from alternative language|hi||IAST}}. This would put the redirect into e.g. Category:Redirects from Wade-Giles or (if the third parameter is not recognized) Category:Redirects from transliterations. Gorobay (talk) 19:58, 21 September 2011 (UTC)

This is the version of the template with the two language parameters. This code is designed to be backwards compatible. Here are some proof-of-concept examples, using this testing template.

Proposed code moved to Template:R from alternative language/sandbox. — Martin (MSGJ · talk)

This code puts an article with:

  • {{R from alternative language}} into "Category:Redirects from alternative languages" (no change from the status quo);
  • {{R from alternative language|xx}} into "Category:Redirects from xx language terms";
  • {{R from alternative language|to=yy}} into "Category:Redirects to yy language terms";
  • {{R from alternative language|xx|to=yy}} into "Category:Redirects from xx language terms" and "Category:Redirects to yy language terms".

Gorobay (talk) 14:33, 25 September 2011 (UTC)

Comment: I like the idea but I am worried that the two different parameters will get confused, e.g. {{R from alternative language|xx}} looks very similar to {{R from alternative language||xx}}. I wonder if we could use a different template for redirects from English? — Martin (MSGJ · talk) 11:53, 26 September 2011 (UTC)
Response: That is what I thought, which is why {{R from alternative language||xx}} won't work. You have to use the unambiguous {{R from alternative language|to=xx}} for that effect. So another template is not necessary. Gorobay (talk) 12:53, 26 September 2011 (UTC)
Would it be logical to have a corresponding from parameter as well? Perhaps an alternative for the first unnamed parameter? I'm just throwing ideas around. — Martin (MSGJ · talk) 16:02, 26 September 2011 (UTC)
A from parameter could be added by changing all instances of {{{1|}}} to {{{1|{{{from|}}}}}}, though I don't think it is necessary. However, since the most common use of this template will be from non-English to English, it is a good idea to let the from language be specified with an unnamed parameter, letting people omit from= if they want. Gorobay (talk) 16:22, 26 September 2011 (UTC)
I've moved your code to the /sandbox where it can be examined/tested more easily. Why do you directly specify some languages, e.g. fr, zh, but use {{ISO 639 name}} for the others? Why not use the template for all of the language names? — Martin (MSGJ · talk) 16:24, 26 September 2011 (UTC)
Short answer: {{Lang}} does it, and I assumed there was a good reason. I know that #ifexist is an expensive parser function, so maybe directly specifying the most common languages helps with the problem. But I don't actually know. Gorobay (talk) 16:39, 26 September 2011 (UTC)
Yes I believe it is to reduce performance problems. But lang is often transcluded many times on the same page; this one is only transcluded once, so there is nothing to worry about. — Martin (MSGJ · talk) 19:50, 26 September 2011 (UTC)
Good; I'm glad there's such a straightforward explanation. I see you have already made this change. I just made a change in the sandbox to eliminate the mention of English, since this template can be used where two non-English languages are concerned. Gorobay (talk) 20:22, 26 September 2011 (UTC)
I've deployed the code in the sandbox. — Martin (MSGJ · talk) 21:10, 26 September 2011 (UTC)
Thank you! Gorobay (talk) 21:21, 26 September 2011 (UTC)

Adding mi/Māori language

I've been trying to work out how to set up redirects for mi / Māori. I've created some redirects such as Amokura and the categories Category:Redirects from mi language terms and Category:Redirects from Māori language terms but neither seem to be populated. Any help would be appreciated. Stuartyeates (talk) 23:30, 1 November 2011 (UTC)

It seems they're now being populated. I've got it sort. Stuartyeates (talk) 08:41, 2 November 2011 (UTC)

Printworthiness

{{Editprotected}} I would like to request an edit to this protected template that would categorize its redirects into the Printworthy redirects category. Before the Editprotected template is activated, there may be editors who would like to discuss this first. Does anyone have an opinion about the printworthiness of the redirects that this template categorizes? – PIE ( CLIMAX )  09:55, 8 February 2012 (UTC)

I disagree. Not all foreign-language redirects are printworthy. For example, Kościół Adwentystów Dnia Siódmego is unprintworthy because it has nothing to do with Poland. Redirects from titles in non-Latin scripts are unprintworthy, since we can't assume an anglophone would be able to look them up. It is better to stick with {{R printworthy}} explicitly or to add a parameter to this template. Gorobay (talk) 13:10, 8 February 2012 (UTC)
Not sure where you get that Kościół Adwentystów Dnia Siódmego has nothing to do with Poland, since this link that is found on this page shows it as the name of the Seventh-day Adventist Church in the Polish Union Conference. In my opinion, the link you gave as an example of unprintworthiness should most definitely be included in a printed version of Wikipedia.
On the other hand, the same words without diacritics, as in Kosciol Adwentystow Dnia Siodmego, and many other redirects like that, should not be included as printworthy. That is handled nicely by the {{R from title without diacritics}} template. So bottom line, I would have to agree that the printworthiness of all 8,442 of these redirects should be decided on an individual basis. Whether {{R printworthy}} is used or a parameter is added to this template, that's going to be a pretty big, though necessary, job. – PIE ( CLIMAX )  19:47, 8 February 2012 (UTC)
PS. Should be noted that the large number is just the main category and does not include subcats.
I think that there's a differentiation between R from original language and R from random language, one that isn't preserved in the structure. For topics whose main language is not in English, the topic name in the original language is definitely printworthy; other languages not so much. Stuartyeates (talk) 22:26, 8 February 2012 (UTC)
Agreed. And that will make an editor's job harder to differentiate the two. But it must be done. It would go a lot faster if we added a parameter to this template that would automatically add redirects to the printworthy category, and allow editors to subdue that with an unprintworthy parameter. That's the way I'm inclined to proceed. – PIE ( CLIMAX )  18:44, 10 February 2012 (UTC)
I am inclined to not categorize these redirects by default. Assessment of printworthiness should be explicit. I also disagree with the premise that non-Latn redirects belong in print. Gorobay (talk) 16:46, 15 February 2012 (UTC)
Either way it's done, it's going to be a teejus job. As for non-Latn redirects that belong in print, what about redirects that are actually English to Latin? For example, this one? I would have to disagree with only Latin-script redirects as printworthy. Other languages are also as printworthy as Latin, to include English when redirected to non-English article titles. – PIE ( CLIMAX )  21:18, 18 February 2012 (UTC)
ISO 15924:LatnISO 639:la. Gorobay (talk) 04:23, 19 February 2012 (UTC)
Sorry, you lost me. By pointing out that ISO 15924 isn't ISO 639, you seem to be saying that ISO 639's are not printworthy (ISO 639:la is "non-ISO 15924:Latn"). If this is your meaning and intent, then we obviously disagree on this issue. I don't understand why you would consider such redirects as unworthy of inclusion in a printed version of Wikipedia. Why is "Latn" worthy, while "la" is not? Why is "Latn" worthy, while other languages are not? – PIE ( CLIMAX )  06:18, 19 February 2012 (UTC)
Latn is not a language; it is a script. ISO 15924 encodes scripts and ISO 639 encodes languages, so I meant that the Latin script is not the same as the Latin language. The example you gave is a redirect with its name in the English language using the Latin script, and so we agree that that is printworthy.
Redirects in scripts other than Latin (e.g. Cyrillic, Devanagari, Hiragana) do not belong in print.
If you want assess redirects' printworthiness, use {{R printworthy}}. It would be inappropriate for this template to do it automatically. That is all I'm saying. Gorobay (talk) 16:30, 19 February 2012 (UTC)
Please forgive any ignorance that I might exhibit. I do understand the difference between a language and the script of a language. What I do not understand is why you insist that "Redirects in scripts other than Latin (e.g. Cyrillic, Devanagari, Hiragana)" are unprintworthy. All you keep saying is that they do not belong in print, but you don't explain why you maintain this position. What will it take to get you to say why you feel that other scripts are not printworthy while Latin scripts do belong in print? The three you mention do, in my opinion, most definitely belong in a printed version of this encyclopedia. Until you will articulate why you feel them to be unprintworthy, then I feel that this template needs an automatic printworthy added, and then we can go through the redirects to weed out the few that do not belong in print. – PIE ( CLIMAX! )  05:31, 12 March 2012 (UTC)

I think we are misunderstanding each other. I will try to explain myself more clearly.

A script is a writing system, for example Hiragana. The English language is written in the Latin script. Presumably, the users of a print version of the English Wikipedia would be familiar with both the English language and the Latin script.

According to Category:Printworthy redirects, "Printworthy redirects should prove helpful to people perusing a hard copy of the same material." Let us consider two situations with redirects from alternative languages.

  • A user sees a reference to Le tour du monde en quatre-vingt jours. They look it up in their hard-copy English Wikipedia, and it redirects them to Around the World in Eighty Days.
  • A user sees a reference to 源氏物語. They don't know the script, so they can't look it up, even though the redirect is there.

A redirect is only useful if users can use it. Most users will not be able to use redirects in scripts other than Latin. That is why redirects in non-Latin scripts are not printworthy in the English Wikipedia. Gorobay (talk) 14:42, 12 March 2012 (UTC)

Thank you, Gorobay, that is definitely a clear explanation. A question that pops into my mind would concern the target of a redirect. Even the 源氏物語 clearly targets the English-titled article, The Tale of Genji. So when, in your second example above, a user sees a reference to 源氏物語, the redirect would show the target in English, how is it that you feel that the user would not be able to look it up? All they would do is look up the article that covers The Tale of Genji, wouldn't they? – PIE ( CLIMAX! )  20:16, 16 March 2012 (UTC)
Let's try an experiment: look up "庫車縣". You are not allowed to use copy and paste, or your browser's search toolbar, or the Wikipedia search function. Gorobay (talk) 11:56, 17 March 2012 (UTC)
Without the use of my search tools, this will have to be a thought experiment. Let's say I happen to be someone who studies Chinese script, and I look this up in a printed edition of Wikipedia. It would no doubt come out on a CD, so that hyperlinks would be preserved. Now, say I come across "庫車縣" on a page that I read, and it is linked. I click on that link and am taken to the target page of that redirect. Just as on Wikipedia, there would be a link to the 庫車縣 redirect near the top of the page. I click on that, and there is the redirect. But only if it has been included, only if it has been deemed as printworthy. If that redirect has not been deemed printworthy, then the first link would have to be changed to the English target page, and there would be no 庫車縣 redirect. So now is a good time to make the 庫車縣 redirect a printworthy redirect, isn't it? – PIE ( CLIMAX! )  09:42, 18 March 2012 (UTC)
PS. You mention above that "most users will not be able to use redirects in scripts other than Latin," yet does not this imply that some users will be able to use those redirects? Isn't it rather presumptious to exclude the "some"? especially since we don't really know the number of readers who are in the "most" and "some" categories?
If it comes out on a CD then it doesn't really matter if there are thousands of extra and little-used redirects, just like it doesn't matter online. I interpreted "printworthy" literally.
Your example is a bit silly, though, because it is seldom appropriate to use a redirect from an alternative language in article text, since article text is supposed to be in English. Including such redirects may not be harmful but it does go against the spirit of printworthiness, which is (as I have quoted above) intended for a hard copy. Gorobay (talk) 12:44, 18 March 2012 (UTC)
Your experiment seemed a bit silly to me, so I responded in like. The interim printed version will probably show up in CD, or even DVD, form. And this is the first wave for which we must prepare. When Wikipedia does finally come out in a hardcopy printed version (and I sincerely believe that someday it will), how do you envision printed redirects to be handled? IOW, where do you see them positioned, and what purpose do you imagine they will serve? – p i e ( Climax! )  17:59, 18 March 2012 (UTC)
I envision two possibilities:
  • Printed redirects are positioned just like all the other articles, except they are only one line long.
  • Printed redirects are listed in an appendix.
Either way, they would serve the same purpose as redirects do now.
If "printworthy" actually means "CD-worthy", then we have been talking at cross purposes. But now I do not understand: what redirects are website-worthy that are not CD-worthy? Gorobay (talk) 18:46, 18 March 2012 (UTC)
Redirects that are CD-worthy would be redirects that would ultimately belong in a hardcopy version, where they would be listed alphabetically and in an index. Printworthy redirects that are scripts from other languages would be listed in accordance with the alphabets of the foreign scripts. – p i e (Climax!)  08:08, 22 March 2012 (UTC)
How is it determined what redirects ultimately belong in a hard-copy version? Are there any guidelines? Gorobay (talk) 11:48, 22 March 2012 (UTC)

Disambiguation page as redirect from alternative language

Interesting discussion at Wikipedia:Articles_for_deletion/南山_(2nd_nomination) that seems to be about whether a word (character string?) with multiple meanings in another language should have a disambiguation page.--Wikimedes (talk) 21:59, 8 July 2013 (UTC)

Edit request on 11 September 2013

Change ISO 639 name to use a vertical bar instead of a space in anticipation of Lua conversion. Change is in the sandbox. — Lfdder (talk) 23:02, 11 September 2013 (UTC)

DoneMr. Stradivarius ♪ talk ♪ 10:17, 13 September 2013 (UTC)

Bug?

Putting |to=en categorizes the redirect in Category:Redirects to non-English-language terms. Is this a bug or have I completely misunderstood how this parameter should work? --JayC (talk) 12:22, 31 July 2012 (UTC)

You have misunderstood. You need only use {{{to}}} when the target language is not English. That said, there is no reason why the template shouldn’t handle |to=en. Gorobay (talk) 13:05, 31 July 2012 (UTC)
Then the documentation needs to be updated so it actually says so. --JayC (talk) 14:59, 31 July 2012 (UTC)
To editors JayC and Gorobay:  Done – Paine Ellsworth CLIMAX! 19:04, 13 April 2014 (UTC)

Additional "from" languages

So that we can have "a bunch" of languages. I would be inclined to make 2 to so that "to" has to be a named parameter if it is not English. All the best, Rich Farmbrough, 21:32, 31 March 2014 (UTC).

We can still have a bunch of languages, Rich. The "2=" numbered param and the "to=" unnamed param are exactly the same and perform exactly the same function. The "2=" param is included so that when this template is used in the {{Redr}} template, the "n#=" param in that template can be used to denote the target language. I tried to use it as a "to=" param, but I got superfluous results. And the "to=" param in this template must stay because of its fairly wide usage on redirects. Nothing has really changed, though. The named param, "to=", may still be used to show the target language. The only minor mod is that now the "en" code can be used with the "to=" param (to=en) and the redirect will no longer be incorrectly categorized. Joys! – Paine Ellsworth CLIMAX! 18:37, 13 April 2014 (UTC)
Instead of doing

{{R from alternative language}}{{R from alternative language}} I wan tto ba able to do

  • This is a redirect from an alternative language – a page name in Bulgarian and Kazakh to a translation into another language. It leads to the title in accordance with the naming conventions for titles in other languages and can help writing. However, do not replace these redirected links with a piped link unless the page is updated for another reason. For more information, follow the redirect category (rcat) template link above.

All the best, Rich Farmbrough, 20:30, 13 April 2014 (UTC).

One challenge I see is that some people won't want to stop with two languages when a word or phrase may be the same in more than two languages. Another challenge is that we wouldn't want to stop with the source/from language(s); the target/to language(s) should also all be listed if appropriate. Sounds like more than I know how to do, but I'll work on it. – Paine Ellsworth CLIMAX! 22:20, 13 April 2014 (UTC)
Indeed, that's why I said have "a bunch" of languages. All the best, Rich Farmbrough, 21:06, 14 April 2014 (UTC).

We should note, Rich, that the {{Redr}} template is designed to make this fairly easy. Subsequent languages may be noted by use of the "e#" parameter in the following manner:

{{Redr|ralterlang|<!--p1=bg|-->n1=en|e1=* This page name is also a {{maroon|Kazakh}} language term. [[:Category:Redirects from Kazakh-language terms]]}}
and this would yield:

{{Redr|ralterlang}}

The background changes to white in mainspace, and I have disabled the categorization from your post so you can see that the above usage of the {{Redr}} template also correctly sorts the page. The inclusion of the category in the "e#" parameter ensures correct categorization of the redirect. This easy workaround appears to be better than if we were to overcomplicate the {{Ralterlang}} template even more than it already is, don't you agree? – Paine Ellsworth CLIMAX! 23:38, 13 April 2014 (UTC)

OK thansk for that. All the best, Rich Farmbrough, 23:44, 13 April 2014 (UTC).

Template-protected edit request on 26 September 2014

Can the message produced by this template be changed so that it links to the corresponding category instead of the template itself?

(The message this template produces on redirect pages links to Template:R from alternative language, but the messages produced by [seemingly] all similar templates link to the corresponding category instead, which in this case would be Category:Redirects from alternative languages.)


This could be accomplished by making the following two changes.


  • Change the line immediately after the first " |{{Redirect template" line from:
|name=[[:Template:R from alternative language|From an alternative language]]
to:
|name=[[:Category:Redirects from alternative languages|From an alternative language]]


  • Change the beginning of the line immediately after the second " |{{Redirect template" line from:
|from=an '''[[:Template:R from alternative language|alternative language]]'''
to:
|from=an '''[[:Category:Redirects from alternative languages|alternative language]]'''

Jdaloner (talk) 22:46, 26 September 2014 (UTC)

 DoneTo editors MSGJ, Wbm1058 and Jdaloner: Since standarization is important, and since the general or parent category does provide access to all the subcategories, it makes more sense to complete your edit as requested. Joys! – Paine Ellsworth CLIMAX! 21:53, 3 October 2014 (UTC)
OK, good, thanks. Wbm1058 (talk) 22:10, 3 October 2014 (UTC)
Hi, Jdaloner – Wbm1058, below, has pretty much summed up why this rcat is designed to bring people directly back to itself rather than to the general language category. One of the things I work on is to find alternative language redirects and to ensure that the ISO-639 language codes are included so that the redirects are categorized to their specific categories. When you look at the two parent categories, Redirects from non-English-language terms and Redirects to non-English-language terms, then you see how confusing it would often be to use the category instead of this template in the beginning of the text. The "corresponding category" is frequently more than one category and not the Redirects from alternative languages category. You didn't mention why you would like to change to the general category. Don't you think that it would be confusing to show that general category, but then sort the redirect to one or two entirely different categories? – Paine Ellsworth CLIMAX! 00:28, 1 October 2014 (UTC)
Thank you (both Wbm1058 and Paine Ellsworth) for the explanation. Makes sense to me. My request [which can be forgotten about now] to change the link in the message wasn't aimed at changing it "to the general category", it was aimed at changing it away from linking back to itself and "to the [singular] corresponding category" as I had neglected to consider the fact that this template sorts pages into subcategories (which most similar templates do not do), and not necessarily into a singular corresponding category. In a nutshell, I was trying to get the message produced by this template to follow the standard form seen on most similar templates, but it turns out this template is already different than most others by design, and thus it's not at all surprising that the message it produces may also need to be different. I actually was already aware of the structure of the subcategories when I made my request, but for some reason when I asked myself why the message from this template might be different than the others, I failed to make the connection. Thanks again for taking the time to respond. Jdaloner (talk) 13:28, 2 October 2014 (UTC)
I just placed some new text at the end of the message and put it in the sandbox. Would that help the situation any? – Paine  00:57, 1 October 2014 (UTC)
@Paine Ellsworth: Look at The Miserable Ones, which is an example given in the template documentation. This is in the hidden categories Category:Redirects from English-language terms and Category:Redirects to French-language terms, but one only sees those if they choose to show hidden categories (in the Appearance tab under Preferences). I think it would be helpful if in the template message English was perhaps boldfaced and linked to Category:Redirects from English-language terms, and ditto for French. – Wbm1058 (talk) 12:41, 2 October 2014 (UTC)
I looked at this, and thanks again for going out of your way with it, but it's not at all necessary. I think the message is probably better left as it currently is. Jdaloner (talk) 13:28, 2 October 2014 (UTC)
I'm beginning to think that your (Jdaloner's) concerns will lead to something. There is a "better idea" in there somewhere. Perhaps an explanation in the documentation to make it explicit as to why the format is different from most other rcats. Thank you both very much! Joys! – Paine  21:42, 2 October 2014 (UTC)

@Paine Ellsworth: You're the main editor responsible for these. Care to comment? I think the reason why this one was implemented differently than the others is because there are specific categories for different languages, e.g.,

So if I look at, for example Au contraire, I see that it is part of Category:Redirects from French-language terms, which is a sub-category of Category:Redirects from alternative languages, but is not directly included in the latter, more general category: The redirect has:

{{R from alternative language|fr}}.– Wbm1058 (talk) 21:44, 30 September 2014 (UTC)
Thank you, Wbm1058! – Paine 
Just an afterthought, Wbm1058 – it may interest you to know that the {{Redr}} template can now detect protection levels similar to the way {{Doc}} does it, except that it works in all namespaces and not just the template space. – Paine  01:31, 1 October 2014 (UTC)

Specified language formatting

Currently, if languages are specified, as for example in {{R from alternative language|en|fr}}, it displays the language names in maroon font. This is undesirable because they look like red links. Since presumably the maroon is used to make the languages stand out, it would be better if they were bold instead. This would conform to the look-n-feel common at Wikipedia unlike the color being used here. I propose we change this. Jason Quinn (talk) 09:57, 6 December 2014 (UTC)

This same suggestion was made for a different template, and I had to agree that the maroon color used did resemble a red link: maroon vs. red link. So I placed the code in the sandbox and have changed the maroon to a bold brown color: maroon vs. bold brown vs. red link. Examples that use the bold brown can be viewed on the {{R from alternative language/testcases}} page.
I like the idea of making the languages stand out with bold; however, some color is needed to make them stand out even more: bold brown vs. bold black. If this is agreeable, then I'll transfer the sandbox code to the live template. – Paine Ellsworth CLIMAX! 20:35, 7 December 2014 (UTC)
Bold text already stands out. Why is any color needed? Gorobay (talk) 22:54, 7 December 2014 (UTC)
Yes, bold black does stand out in a text background of black; however, as I said, the bold brown color stands out better. It "catches the eye", which I feel is important for this rcat template. – Paine Ellsworth CLIMAX! 02:43, 8 December 2014 (UTC)
I don't think it stands out better. In fact, pretty much by definition, black has more contrast with white than any color. So, I think it's just color for the sake of color and clashes with the general feel of Wikipedia styling. So, I think just bold is best IMO. Jason Quinn (talk) 13:24, 8 December 2014 (UTC)
I agree. Plain bold is sufficient emphasis for article leads, and should be here too. Gorobay (talk) 19:52, 8 December 2014 (UTC)

Okay, my friends, it looks like I'm outnumbered, so both maroon and brown are out. I've been thinking for awhile how this rcat would look if the languages were linked, so I've tried that out in the sandbox and it tests well. How would you feel about that? (Examples are found on the testcases page.) – Paine Ellsworth CLIMAX! 00:42, 9 December 2014 (UTC)

I guess linking them is a good idea. The only objection I could envision being made to that would be WP:OVERLINK concerns for everyday words. BUT since the languages themselves are the main subject here it seems to make sense to link them and many of the smaller languages are not everyday words so having a link could prove helpful. More I think about it, more I like the idea of linking the languages. Jason Quinn (talk) 18:03, 9 December 2014 (UTC)

To editors Jason Quinn and Gorobay:  Deployed. – Paine Ellsworth CLIMAX! 05:02, 12 December 2014 (UTC)

Thanks, Paine Ellsworth (talk · contribs). Looks good. PS for some reason Template:To never pinged me with your comment. Jason Quinn (talk) 00:35, 13 December 2014 (UTC)
Thank you! I'm not sure why the NS system doesn't work sometimes. For example, I've received messages on my user talk page and wasn't notified. Other times it works. I made template {{To}} to supplement {{Ping}} because I found it to be a psychological disadvantage to talk "at" (@) people rather than "to" them. Anyway, I just made the To template more like Ping, so it will hopefully work better now. Here's a try: To editor Jason Quinn: – Paine  08:45, 13 December 2014 (UTC)
The NS worked this time. See you around, Jason Quinn (talk) 09:50, 13 December 2014 (UTC)

Category linking

Currently the only category the template links to is the general Category:Redirects from alternative languages. Wouldn't it be better to have it link to the most relevant specific category, for example Category:Redirects from Greek-language terms? This suggestion was briefly discussed in a previous thread from 2014. Uanfala (talk) 11:07, 22 June 2016 (UTC)

Many of the redirects use both "from" and "to" parameters, which means there are two categories involved. Linking to both would make an already relatively complicated rcat quite a bit moreso. Editors can, if they have their preferences set to see hidden categories, just go to the bottom of the page to find links to the specific cats.  Wikipedian Sign Language Paine  21:28, 29 June 2016 (UTC)
@Uanfala:  Wikipedian Sign Language Paine  13:34, 30 June 2016 (UTC)
Yes? I'm aware of the option to navigate using the hidden categories to navigate, but I was thinking of something that would be available to anyone, regardless of what their settings are. And I was thinking more about consistency with similar templates and less about convenience. Either way, I'm not insisting. Uanfala (talk) 16:17, 30 June 2016 (UTC)
I marginally agree with Uanfala on this. While I'm a fan of giving templates useful features (while the devs tell us again and again to not fret about server cycles for processing this stuff), and of detailed categorization, the maintenance work in this case is so fiddly that anyone involved in it should have the hidden categories feature turned on anyway, or they might not really understand what's going on in maintenance categorization and thus be prone to make mistakes, even create redundant categories and templates.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  22:57, 10 July 2016 (UTC)

Not picking up second language

I just tried {{R from alternative language|gd|ga}} at the redirect Goraidh (→ Gofraid) and it failed to identify Irish as the second language. I have no had enough sleep or coffee to debug this, and have 7 other pages with pending edits to save, so maybe someone else can look into this in the interim.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  22:40, 10 July 2016 (UTC)

 Done It was because Category:Redirects to Irish-language terms didn't exist until now. Uanfala (talk) 23:13, 10 July 2016 (UTC)

Italics

There are way too many false positives. What is the point of italicizing these anyway? Gorobay (talk) 21:24, 15 November 2016 (UTC)

To editor Gorobay: The reason I did this was to conform to MOS:FOREIGNITALIC; however, I have noticed some scripts that should not be italicized and have had to use the "noitalic" in the third parameter. Do you think that these should be handled on an individual basis rather than by the template?  Paine Ellsworth  u/c 00:41, 2 December 2016 (UTC)
The template should detect the script and only italicize Latin; I think this requires a Lua module. |3=noitalic should be kept as a manual override, though it won’t often be necessary. Gorobay (talk) 03:48, 2 December 2016 (UTC)
To editor Gorobay: okay, your suggestion has been tested and engaged. I'm curious though as to why you would not include the Greek along with the Latin?  Paine Ellsworth  u/c 16:12, 2 December 2016 (UTC)
Per MOS:FOREIGNITALIC, Text in non-Latin scripts (such as Greek, Cyrillic or Chinese) should neither be italicized as non-English nor bolded. Your recent change is wrong: it italicizes only the Latin language, whereas it should italicize anything in the Latin script. Gorobay (talk) 18:37, 2 December 2016 (UTC)
There is only so much that can be done with wikimarkup, or perhaps I'm not well-versed enough to do what you suggest? This rcat has thus far not been able to discern between languages and scripts. As long as the "la" code for Latin is in the first parameter, it should italicize the title no matter what script is used. And my question about Greek was not in regard to the ancient AlphaOmega type letters, but to those Greek redirect titles that are in the English/Latin script, AZ, such as Malotira and O dromos tis Korinthou. So I ask for your help to make this rcat better if possible.  Paine Ellsworth  u/c 20:34, 2 December 2016 (UTC)

Perhaps an example will help. Opération béton is a redirect from French to English. It is in a foreign language and written in the Latin script, so it should be italicized. However, it is not. Why? Because your latest edit disables italicization for everything except the Latin language.

The solution is to italicize based on script. The problem, as you have discovered, is that that cannot be done in a MediaWiki template. That is why I said it would require a Lua module. The Lua module would not need to care about the language. Transliterated Greek would be treated exactly like French.

Another solution is to not do any italicization. It would be a lot simpler that way. Redirect titles are already visually set apart from the other text on the page, so I do not think it is necessary to also use italics. However, if you think it is worth it, I would be happy to write some Lua. Gorobay (talk) 23:52, 2 December 2016 (UTC)

I have removed the italics from the template. I'm still learning Lua, so let me take a stab at it. Thank you for your offer to write the Lua, and I will definitely come to you when I get stuck.  Paine Ellsworth  u/c 16:08, 3 December 2016 (UTC)

What language should scientific names be?

I just noticed this template now expects a value for the language that is being redirected to. I've used it quite a bit on non-English vernacular names for species that redirect to the scientific name. What language should be specified when the target is a scientific name? Wiktionary treats scientific names as translingual (e.g. wikt:Rhododendron) and suggests ISO value "mul". That seems like the best choice to me. Otherwise, I'd be OK with calling scientific names English. Calling them Latin is unacceptable; scientific names are frequently etymologically Greek, or rarely entirely etymologically derived from any of dozens of languages (or more commonly, derived in part from any of dozens of languages with a "Latinized" ending applied, which still raises the question of how Latin is a name such as Willdenowia that uses letters not found in the classical Latin alphabet). Plantdrew (talk) 02:22, 1 March 2017 (UTC)

Sorry, Plantdrew, I've been backed up on my watchlist, so I'm just now getting to 1 March. This sounds like a gnarly challenge. I have noted in the past that editors will use this template four or five times on a redirect if necessary to show that the term is used in more than one language. I'll check some stuff and get back to you.  Paine Ellsworth  put'r there  06:26, 22 March 2017 (UTC)
To editor Plantdrew: I see at ISO 639-3#Special codes that "mul is intended for cases where the data includes more than one language, and (for example) the database requires a single ISO code". So far, our database hasn't required a single ISO code, since this rcat may be used more than once on a redirect. I also checked for Category:Redirects from multiple-language terms and there doesn't seem to be anything like it. When possible, it might be better to continue what other editors have done and include this rcat two or more times on a redirect to show all or at least the more common or prominent languages for a given term. I know that some scientific names are combinations of Latin and Greek, and there may be other languages also in the derived text. I think the original purpose of tagging and sorting specific-language redirects wouldn't be served well by the mul code. I could be wrong.  Paine Ellsworth  put'r there  06:59, 22 March 2017 (UTC)
@Paine Ellsworth: I'm not sure I understand what you mean about using the template multiple times. Kinnikinnick is an article, but if the article on the smoking mixture didn't exist, that title might be a redirect to Arctostaphylos uva-ursi (Arctostaphylos is etymologically Greek and uva-ursi is Latin). Are you saying you'd give that hypothetical redirect two templates with language pairs unm/gk and unm/la (and maybe two more templates for en/gk and en/la as well)?
I can see where huacatay could get a template for being a redirect from Spanish, and another for Quechua (the etymological origin of the word in Spanish). But I'm not comfortable saying that is a redirect from Spanish to Latin. Tagetes minuta appears in English texts, not Latin ones. Plantdrew (talk) 16:38, 22 March 2017 (UTC)
To editor Plantdrew: in your first example, if that article were a redirect, then yes, it should be tagged as follows:
{{R from alternative language|unm|la}}
{{R from alternative language|unm|el}}
Keep in mind that the ISO 639-3:unm language code has not yet been used on a redirect, so it isn't found at WP:Template messages/Redirect language codes – code sort, yet. There isn't yet a Category:Redirects from Unami-language terms, nor the "to" language category, either. I haven't found a gk code, but the ISO 639 code for Greek is el. Now, as for using the en code:
{{R from alternative language|unm|la}}
{{R from alternative language|unm|el}}
{{R from alternative language|en|la}}
{{R from alternative language|en|el}}
I am not averse to it when editors go farther than I would with this template as long as they are ultimately correct with the derivations.
The Tagetes minuta is one that I need to research, which is why the "to" language is "undetermined". The Huacatay redirect probably should have the qu=Quechuan code either in addition to the es=Spanish or in place of it – not sure myself. Tagetes comes up in Google Tranlate as English, and minuta is Latin for "mites", also Bosnian for "minutes". Needs more research. I'm going to look more deeply into Carl Linnaeus to see if there is anything on where he came up with the genus and species names that he's left to us. Hope this helps!  Paine Ellsworth  put'r there  18:05, 23 March 2017 (UTC)
I agree with Plantdrew that tagging binomial names as redirects to Greek or Latin doesn't make sense – such names aren't used in either of these languages. – Uanfala (talk) 18:43, 23 March 2017 (UTC)
Not sure I understand, Uanfala. Would you elaborate a bit?  Paine Ellsworth  put'r there  10:03, 24 March 2017 (UTC)
A scientific name is not a name in either Latin or Greek. See Plantdew's comment below, to which I could add that even the few names that might be recognisable to a classical Latin speaker, they aren't the names that speaker would use for the given species. – Uanfala (talk) 13:58, 24 March 2017 (UTC)
A scientific name is not a name in either Latin or Greek.
And yet, some of them are wholly Latin, some wholly Greek, some a mixture of Greek and Latin, some a mixture of Greek or Latin with other languages and some are other languages. I think Plantdrew's point below is that unless one is certain what the language(s) is, then one should leave it as undetermined and do further research until one is certain. I agree with that.  Paine Ellsworth  put'r there  13:29, 26 March 2017 (UTC)
The fact that the nomenclature uses elements from Latin or Greek doesn't make the binomial name Latin or Greek or whatever. We wouldn't dream of thinking of "quantum physics" as a Latin term just because it uses a Latin loanword. If binomial redirects started getting classified based on their etymologies (for which I see no purpose) then the relevant redirect categories would get completely swamped with these and maintaining the proper redirects from Latin names would become impossible. – Uanfala (talk) 19:39, 26 March 2017 (UTC)
You make good points, and at the present rate of redirect categorization of language terms, there is no great rush to make a decision. At the very basis of this should be the fact that this rcat was created to keep track of the thousands of redirects that are involved, and that we should be careful about making exceptions for certain types of language redirects, such as those in a science context.  Paine Ellsworth  put'r there  22:01, 26 March 2017 (UTC)
Well, thanks for thinking about this Paine. I should have known Greek was "el", not "gk". I don't think I'll be adding "to" languages; I don't quite agree with treating scientific as Latin/Greek, and there are plenty of other things to keep me busy on Wikipedia. It's a continuum; at one end there's hippopotamus, rhododendron, fuchsia and boa constrictor that are pretty unquestionably English names for these organisms (that happen to be the same as the scientific names). At the other end is Quercus alba, that is something that would be recognizable to a classical Latin speaker (though they might not understand that "alba" denotes a species rather than just a color). And then there's Xiongguanlong; I'm not sure if the -long is a Latin element, but there's nothing Latin about the rest of the name. At least there are no alternative language redirects to worry about for these examples.
Regarding "huacatay", the current standard orthography for Quechua would have it as "wakatay", which I assume is why the language was changed from qu to es in 2012. Plantdrew (talk) 20:08, 23 March 2017 (UTC)
It's a pleasure Plantdrew! These can become extremely complicated at times. I was able to find an example of more than one application of this template on a single redirect at KSČ. That was added by Gorobay, whom I consider far more expert than I am. Maybe Gorobay would give us an opinion on all this?  Paine Ellsworth  put'r there  10:02, 24 March 2017 (UTC)
Yes, it would be good to hear from Gorobay; he's also responsible for changing huacatay from qu to es. Plantdrew (talk) 20:00, 24 March 2017 (UTC)

Rename of cdo, nan categories?

I believe Category:Redirects from Min-dong-language terms and Category:Redirects from Min-nan-language terms need to be renamed to Category:Redirects from Eastern Min-language terms and Category:Redirects from Southern Min-language terms, right? The language names were changed in Template:ISO 639 name cdo and Template:ISO 639 name min, but the categories are still at the old names. Or is there something else that should be done here? Cheers, 59.149.124.29 (talk) 01:45, 29 December 2017 (UTC)

After further investigation I am reasonably confident that the above course of action is correct, so given the lack of response here I have nominated them at CFD; if I have got this wrong, please object there. 59.149.124.29 (talk) 17:21, 12 February 2018 (UTC)

When the redirect target isn't technically an alt lang

Someone created 橋彼道 as a redirect to Qupital. I tagged the redirect with {{r from alt lang|zh|en}}, but it occurred to me that "Qupital" isn't exactly English. Is this still the appropriate redirection template for this case or is there a more suitable one?

In addition: In this case, "Qupital" isn't a transliteration of the Chinese—the Chinese characters seem, in fact, to be retrofitted to the transcribe "Qupital"— but what would the answer be in the case where the non-English name was the original one, and the article is under a title that is nothing more than a romanization of the original? We don't have {{r to transliteration}}. Should we? Largoplazo (talk) 16:11, 3 January 2018 (UTC)

I came here with this same situation. There are thousands of transliterations sitting in Category:Redirects to undetermined-language terms. They are almost always marked with the language they are from, but what to use for the to language is unclear. These are not English words, but putting the same language in both from and to seems weird. --RL0919 (talk) 17:35, 29 May 2018 (UTC)

IETF language tags are not ISO 639 codes. I have recently written Module:ISO 639 name which returns the language name associated with the given ISO 639-1, -2, -3, or -5 language code. When given IETF tags, the module returns the language name along with an error message. The purpose of this new module is to replace {{ISO 639 name}} and the 1100-ish {{ISO 639 name xx}} templates with a single module using a data set taken directly from the ISO 639 custodians.

Because this template currently uses {{ISO 639 name xx}} templates, I had thought to simply replace them with {{#invoke:ISO 639 name|iso_639_name|...}}. But, the list of codes and names currently in use shows at least one IETF tag (en-au) so a better choice is Module:Lang which has support for IETF tags.

I have implemented this in the sandbox and results can be seen at Template:R from alternative language/testcases. If there is no objection, I shall update the live template from the version in the sandbox.

Trappist the monk (talk) 14:58, 25 October 2018 (UTC)

There having been no comments, done.
Trappist the monk (talk) 11:15, 27 October 2018 (UTC)
To editor Trappist the monk: seems your edit has emptied several subcategories in the language redirects categories, for example, the subcats in Category:Redirects from non-English-language terms. I just noticed this while catting the Bodhi redirect and found that the ISO 639-1 code for Pali, "pi", does not sort the redirect to Category:Redirects from Pāli-language terms, but instead to the Undetermined redirects category. Are those empty subcats the result of missing codes in Module:Lang or one of its submods? I tried to find where to add "pi" for Pali back in, but was unable to locate. Paine Ellsworth, ed.  put'r there  12:55, 22 November 2018 (UTC)
The ISO 639 spelling of the language name associated with code pi is 'Pali'. Module:Lang gets this spelling from Module:Language/data/iana languages which is taken directly from the IANA language-subtag-registry file, itself derived from ISO 639 parts 1, 2, 3, and 5. Prior to my edit, this template used {{ISO 639 name pi}} as the source of the language name. In that template, the language name is spelled 'Pāli'; the source of that spelling is not identified.
This template looks for the existence of a category that has the language name; in the example cases, previously for Category:Redirects from Pāli-language terms and now for Category:Redirects from Pali-language terms. Because the latter category does not exist, this template places the Bodhi redirect in Category:Redirects from non-English-language terms.
The correct solution for the pi case is, I think, to move Category:Redirects from Pāli-language terms to Category:Redirects from Pali-language terms.
Trappist the monk (talk) 14:24, 22 November 2018 (UTC)
To editor Trappist the monk: yes, thank you for that! I altered the category and "ISO 639 name pi" spellings to conform. It's all good. I'll check the other empty cats for more needs. And yes, you might just hear from me again if I need your help. :>) BTW, awesome job on those mods and submods! Paine Ellsworth, ed.  put'r there  15:24, 23 November 2018 (UTC)

Link to language

Please replace the template by this sandbox, to solve the problem described in Template talk:Lang#Ligurian dab. This will correct wikilinks for languages called X where the article is not titled (or redirected from) "X language". It should also make the code marginally simpler and faster. Certes (talk) 12:15, 17 December 2018 (UTC)

done
Trappist the monk (talk) 12:20, 17 December 2018 (UTC)

R to English

{{R to English}} redirects to this template. It only had ten transclusions, all but one of which had neither language parameter supplied. (The other had them in the wrong order.) I've added the parameters and changed the transclusions to use {{R from other language}}.

The title {{R to English}} is misleading: we should delete it. Alternatively, were it to be a template that supplied "en" for the second parameter – surely the most common case – it would be more useful (and that is not technically challenging). 178.164.139.37 (talk) 11:35, 5 January 2019 (UTC)

 Done. It is now a separate template, a wrapper for this one with |2=en hard-coded. Added separate documentation for it.  — SMcCandlish ¢ 😼  05:06, 6 January 2019 (UTC)
Thanks very much! I did a bit of WP:BEFORE, but found no previous discussion, so I was hesitant to make the change myself. (Same proposer, different IP) 92.249.211.146 (talk) 05:57, 6 January 2019 (UTC)
I fixed a mismatched brace and added the named |from= parameter (as documented), see Template Talk:R to English. 92.249.211.146 (talk) 11:07, 6 January 2019 (UTC)

Printworthiness

I've updated Template:R to English/doc#Printworthiness to what I believe to be correct (i.e. default to "no"). This meant I could cut out some text about "no default" behaviour. I guess it was copied from Template:R from alternative language/doc#Printworthiness, which makes for heavy reading, and doesn't mention the (supported) |printworthy= parameter at all. I hesitate to edit what seems like boilerplate text. Is it? Or can I boldly update it? 92.249.211.146 (talk) 12:13, 6 January 2019 (UTC)

Bugs in printworthy param

I think there's a couple of bugs in passing through |printworthy= parameter. The existing code (to pass the parameter to {{Rcat}}) is:

|printworthy={{main other|{{#ifeq:{{{1}}}{{{from|}}}{{{lang|}}}|en|{{#ifeq:{{{printworthy}}}|no|no|yes}}}}}}

For example, I made a test edit without saving to The Miserable Ones, an R from en to fr, removing the {{-r|R unprintworthy}} and putting "|printworthy=no", it still populates Category:Printworthy redirects (as does any other value, or absence of value).

I made another test edit withou saving at Wien, an R from de to en, using the same procedure, it still populates Category:Printworthy redirects (as does any other value, or absence of value).

I did the same, susbtituting {{R to English}}, with the same effect.

I think there are a few reasons which conspire:

  1. The parameters |1= and |printworthy= are not defaulted (piped) to the empty string, and so according to Help:Magic words#Conditional are taken literally as "{{{1}}}" or "{{{printworthy}}}", this seems to make mainspace redirects populate Category:Unprintworthy redirects sometimes.
  2. In the test for "from" being equal to "en", if it is not, then the value passed is the empty string (there is no "else" case to the outer #ifeq.) So any value given by the transcluder is entirely ignored for "from" languages other than English, and neither category will be populated.
  3. |printworthy= is not passed through in the "other" parameter of {{main other}} i.e. when the namespace is not the main article space. So, outside of article space, the redirects never populate either category.
  4. A "default" empty value (populating neither category) is not respected. The underlying {{rcat}} template uses Module:Yesno to determine truthiness, and the empty value is treated as populating neither category.

I think the expresion for |printworthy= should be:

  |printworthy={{{printworthy|{{main other|demospace={{{demospace|}}}|{{#ifeq:{{{1|}}}{{{from|}}}{{{lang|}}}|en|yes|no}}}}}

In other words:

  • The value of {{{printworthy}}}, if not empty, else
  • If the page is not in main article space (or the given demospace), the empty string, else
  • "yes" if the "from" language is "en", "no" otherwise

(Percolating the {{{demospace}}} to {{main other}} makes this much easier to test.)

I'll try this out in the sandbox, but I better record my findings here first. 92.249.211.146 edited 92.249.211.146 (talk) 11:54, 7 January 2019 (UTC)

Update:. I've made a new version in the sandbox. Actually, Module:Redirect template will only ever categorise redirects (of any kind) as printworthy or unprintworthy if they are in main article space, so the transclusion of {{Main other}} is completely redundant. I think the version in the sandbox now works properly, but of course the test cases won't populate the categories: syntactically it seems OK with hand-checking subst: results etc. 92.249.211.146 (talk) 15:39, 7 January 2019 (UTC)

Grumble. Having struggled with this, I think it fair to say that the whole "Printworthy" business has grown a bit unwieldy. {{Rcat shell}} have a {{{printworthy}}} parameter which really only for internal use by transcluding templates, not by article-space transclusions. Some templates such as {{R from plural}} hard-code it as "no" and some (such as {{R from ambiguous term}} as "yes", which leads to fun when they are combined: the redirect ends up in both categories. {{R from alternative spelling}} has hard-coded catgegorization rather than using the base parameter. Some, of course, accept yes/no and some expect a positional parameter where printworthy/unprintworthy is selected depending on its presence or absence.

It really makes it hard to categorize redirects correctly without looking up the documentation for each one. And even then, that's not much good, since quite often it is out of date or incorrect.

Let alone that Module:Redirect template can populate the categories but then you won't get the "printworthy"/"unprintworthy" banner on the template's page, so we still need {{R printworthy}} and its twin for those, and even those don't let the module actually do the categorization. Nor do they work for anything but mainspace, however hard you try, which seems an odd decision. If you want to mark a redirect in Help: namespace as printworthy, for example, you have to manually categorize it.

This is all out of scope for this template, of course... so, grumble over. 92.249.211.146 (talk) 09:43, 8 January 2019 (UTC)

Bug in "from" language parameter

Recently, I noticed that the "from" language was displaying as undetermined when using the syntax {{R from alternative language|from=X|to=Y}}. This is particularly problematic as it is the syntax used by Twinkle. The "to" field appears to be unaffected, and using other syntax such as {{R from alternative language|X|Y}} also avoids the bug.

Examples:

Pinging Wugapodes as they are the only editor to have made a recent change. signed, Rosguill talk 15:15, 18 July 2019 (UTC)

Printworthy

This template, in spite of having a "printworthy" parameter, does not populate Category:Printworthy redirects and Category:Unprintworthy redirects. Paine Ellsworth, sorry to bug you, but is this something with which you, as the top contributor to this template, could assist? Or, is categorization intentionally disabled? Thanks, -- Black Falcon (talk) 23:28, 17 November 2019 (UTC)

To editor Black Falcon: thank you for asking! Some rcats are set to automatically tag redirects as printworthy or unprintworthy, and some are not. This rcat is not except in a limited way. The only time this rcat will autosort is if the redirect is in the English language and targets an other-language article title. For example, if the redirect is in English and the target article title is in French...
{{R from alternative language|en|fr}}
results in autosorting to Category:Printworthy redirects. If the redirect is not considered printworthy, this rcat allows for that with its |printworthy= parameter...
{{R from alternative language|en|fr|printworthy=no}}
results in autosorting to Category:Unprintworthy redirects. These are the only conditions where this rcat will autosort printability. All language codes other than "en" for English in the first parameter leave the printworthy sorting to editors using either {{R printworthy}} or {{R unprintworthy}}. I think this was because this is the English Wikipedia, and that is why the default for English redirect titles is "printworthy". Thanks again and hope this helps! P. I. Ellsworthed. put'r there 08:27, 18 November 2019 (UTC)
PS. I just clarified this in the documentation. P. I. Ellsworthed. put'r there 09:17, 18 November 2019 (UTC)
This is most helpful, and thank you for updating the documentation to reflect this! Is this template behavior intentional? I do not quite understand why an editor should have to manually add {{R printworthy}} or {{R unprintworthy}} when |printworthy=[yes/no] is already specified in this template. It seems redundant/duplicative... -- Black Falcon (talk) 05:32, 19 November 2019 (UTC)
Thank you very much, Black Falcon! Knowing the history, which is touched upon on the Template:Redirect category shell/Comparison page, and knowing the main purpose of rcats can be helpful in all this. If the main purpose were just to categorize redirects, then they could be sorted using just square brackets, as is done at the bottom of articles. So the main reason we use templates is to place text on redirects that can give editors more information about why a redirect is so categorized. What this boils down to is that editors should use rcats like {{R printworthy}} and {{R unprintworthy}} even if they are already added by another rcat template. That way their texts will appear on the redirects to fulfill their main purposes. That is why editors should always manually add a printability template to any and all mainspace redirects.
As for this rcat and its |printworthy= parameter, that was added years ago because an editor did not want to tag some English redirects as printworthy, which was and is the default. The printworthy parameter was included so editors could tag some English-titled redirects as unprintworthy. Again, thanks and hope this helps. P. I. Ellsworthed. put'r there 06:50, 19 November 2019 (UTC)
Thank you for providing this background information! It seems to me, then, that the |printworthy= parameter in this template is only doing half of the job, and one of two changes should occur. One option would be to deprecate the |printworthy= parameter (via a bot request to replace all uses with {{R printworthy}} or {{R unprintworthy}}) and then remove it from this template. Another option would be to modify this template so that |printworthy=(yes/no) would transclude and display {{R printworthy}} or {{R unprintworthy}} instead of just adding the respective categories. -- Black Falcon (talk) 03:53, 1 December 2019 (UTC)
Prefer the second. If it has a printworthy parameter (which I think it should for backwards compatibility), it should operate as a user would expect: yes means sorting into printworthy, no means sorting into unprintworthy. Wug·a·po·des​ 20:40, 1 December 2019 (UTC)
To editor Black Falcon: I think the idea here is to auto-sort the English redirects to Category:Printworthy redirects unless an editor specifically thinks the redirect is unprintworthy. And with all other language redirects, editors must make a choice between printworthy and unprintworthy and apply the {{R printworthy}} or {{R unprintworthy}} rcats as they choose. As for transclusions and display, I tried doing that awhile back, but editors complained, so I had to go back to the old way of editors manually applying the rcats. PI Ellsworth  ed. put'r there 15:16, 5 December 2019 (UTC)
Thank you for your comments. To Paine Ellsworth: I think your recent update to the documentation conveys that appropriately, so I suppose it could be fine to leave things as they are. However, it just seems counterintuitive that a parameter called "printworthy" would have such a limited function. If the |printworthy= parameter of this template is solely intended to allow manual suppression of Category:Printworthy redirects for English-language redirects, then I think a better option would be to deprecate and replace the parameter, as follows: (1) keep the current default categorization behavior, (2) automatically suppress it if the {{R unprintworthy}} rcat is used outside of this rcat (i.e., if it appears on the redirect page), (3) deprecate the parameter by replacing all instances of {{R unprintworthy|en|xx|printworthy=no}} with {{R unprintworthy|en|xx}}{{R unprintworthy}}, and (4) edit this template to remove the parameter. -- Black Falcon (talk) 02:25, 9 December 2019 (UTC)

How to find invalid language codes

I recently noticed an invalid language code in Brünn ({{R from alternative language|de|cz}}, where cz should be cs, representing Czech) and wondered if other redirects had the same error. Unfortunately the search box does not allow searching redirect pages. hastemplate:"r from alternative language" insource:"cz" gives no results and hastemplate:"r from alternative language" only gives non-redirect results. Could the template add a tracking category for invalid language codes, or is there another way to perform this type of search? (The Template Parameters Toolforge site doesn't work for this, apparently because it doesn't track templates inside of other templates and this template is always inside {{rcatsh}}.) — Eru·tuon 22:49, 17 August 2020 (UTC)

I ended up grabbing all redirect pages from the 2020-08-20 dump and fixing all {{r from alternative language}} with cz.

Here's the full list of "from" and "to" codes not in either Module:Language/data/iana languages or Module:Language/data/ISO 639-3, if anyone wants to clean them up. There are some false positives because I didn't parse language tags (en-gb) or remove HTML comments. Ideally the template would categorize for this. — Eru·tuon 09:45, 28 August 2020 (UTC)

Explain syntax if language codes aren't inputted

If there aren't language codes in the template, could it be changed so on page preview it has a warning that tells you what the syntax would be? For example

From an alternative language: This is a redirect from a page name in an as yet undetermined language to a page name in an as yet undetermined language.

WARNING: If they are known, specify the languages using the syntax {{R from alternative language|redirect's [[List of ISO 639-1 codes|ISO code]]|target's ISO code}}

or something similar would be nice to simplify the use of the template. DemonDays64 (talk) 18:34, 13 September 2020 (UTC) (please ping on reply)

Swedish to Swedish?

To editor Trappist the monk: just noticed before I edited the Svenska redirect that even though the code was {{R from alternative language|sv}}, the text read "This is a redirect from a page name in Swedish to a page name in Swedish." See this diff. It should have read "This is a redirect from a page name in Swedish to a page name in an as yet undetermined language." That particular redirect has been fixed by using "en" in the second parameter. Yet something is still not working quite right, don't you agree? Not very Lua proficient myself, so hopefully you can fix this language redirect template. P.I. Ellsworth  ed. put'r there 00:35, 22 February 2021 (UTC)

Did some testing in the sandbox, see test cases. It seems that the code in the #default= parameter:

              |#default={{#if:{{#invoke:lang|is_ietf_tag|{{{2|}}}{{{to|}}}}}
                        |{{#invoke:lang|name_from_tag|{{{2|}}}{{{to|}}}|link=yes}}
                        |an as yet [[undetermined language]]}}}}.

is somehow involved. When removed, things get back to normal as shown in the test cases. P.I. Ellsworth  ed. put'r there 01:44, 22 February 2021 (UTC)

Also note that this is a text problem only. Categorization appears to be unaffected. To be clear, even though the text reads "from" Swedish "to" Swedish, the "to" category is still Redirects to undetermined-language terms. P.I. Ellsworth  ed. put'r there 02:12, 22 February 2021 (UTC)

We see by looking at the other test cases that removing that code is not an option. We lose the second language which falls back on the "undetermined" option when another language is present in the 2nd parameter. So I still don't know how to fix this. I'll keep trying and I hope you get a chance to look at it, too. P.I. Ellsworth  ed. put'r there 09:46, 22 February 2021 (UTC)

I've hacked Module:Lang so that the template works as it should. If you preview this section of the ~/testcases page, you can see that the template does as it should do. At the bottom of that page click the 'Parser profiling data' link and at the bottom of that, click [show] under Lua logs. The template calls is_ietf_tag() twice; once for {{{1|}}}{{{from|}}}{{{lang|}}} and once for {{{2|}}}{{{to|}}}.
In the Lua log, there are pairs of debug information. Item 1 is the argument received from the template in the {{#invoke:lang}} frame and item 2 is the value from a call to the Module:Arguments getArgs() function.
The first item pair is from {{#invoke:lang|is_ietf_tag|{{{1|}}}{{{from|}}}{{{lang|}}}}} where {{{1|}}} is 'sv'. Both item 1 and item 2 show that 'sv' is the 'from' language.
The second item pair is from {{#invoke:lang|is_ietf_tag|{{{2|}}}{{{to|}}}}} where {{{2|}}} is an empty string. Item 1 shows the empty string but item 2, after the call to the getArgs() function, shows 'sv' as the 'to' language. This seems to indicate that there is a problem with Module:Arguments so I will post a note at that module's talk page to see if there is something wrong with that module or (more likely) something that I am not understanding about how to use it.
Trappist the monk (talk) 16:24, 22 February 2021 (UTC)
Figured it out. A handy thing about Module:Arguments getArgs() function is that it can fetch arguments from the {{#invoke:lang}} frame and from the {{R from alternative language}} template frame. This is the default mode. In the Swedish example, argument [1] to is_ietf_tag() has 'sv' as a value in both the template frame and the {{#invoke:lang}} frame for the 'from language tag'. When it came time for the 'to language tag', argument [1] to is_ietf_tag() got {{{2|}}} from the template frame (an empty string). Because that argument is an empty string, getArgs() looks at argument [1] in the template frame and finds 'sv', a valid IETF tag so is_ietf_tag() returns true causing the template to use Swedish as the 'to' language.
Yeah, I know, confusing, but the functionality really is handy. I have constrained is_ietf_tag() to tell getArgs() to use only the {{#invoke:lang}} frame.
Trappist the monk (talk) 18:01, 22 February 2021 (UTC)
But, that isn't a good fix because now this, which should return true, doesn't (fixed):
{{lang|fn=is_ietf_tag|sv}}true
though the function does when called this way:
{{#invoke:lang|is_ietf_tag|sv}}true
So, I have to find an alternate solution.
Trappist the monk (talk) 20:25, 22 February 2021 (UTC)
I have created is_ietf_tag_frame(), a frame-only version of is_ietf_tag() (which now works in the above example). On ~/testcases, the Swedish live tests work but the sandbox test don't because the sandox does not use is_ietf_tag_frame().
Trappist the monk (talk) 01:27, 23 February 2021 (UTC)
To editor Trappist the monk: that was an awesome fix and thank you beyond words! You're so much better at troubleshooting this than I am, and I'm so glad you're here to repair these things. Thanks again and Best of Everything to You and Yours! P.I. Ellsworth  ed. put'r there 01:56, 23 February 2021 (UTC)

Language code 1=ug is not populating Category:Redirects from Uyghur-language terms

I created a redirect ئىلزات ئەخمەت, which is Ilzat Akhmetov's Uighur name; however, the category this was put into was the generic Category:Redirects from non-English-language terms. TartarTorte 14:37, 13 August 2022 (UTC)

The language name can be seen in the template's rendering at ئىلزات ئەخمەت:
This is a redirect from a page name in Uyghur to a page name in English
Uyghur not Uyghur. There is no category Category:Redirects from Uyghur-language terms and this template cannot add the redirect to the non-existent category. I assume that at some time in the past, a decision was intentionally taken to not redlink needed categories.
Trappist the monk (talk) 15:13, 13 August 2022 (UTC)
The page Category:Redirects from Uyghur-language terms says to use {{Rcat shell|{{R from alternative language|1=ug|2=(the < to > ISO 639 name code)}}}} to get a page into that category is why I brought this up. Should that documentation be changed to have a different language code? TartarTorte 16:43, 13 August 2022 (UTC)
This template is not broken.
The ISO 639-1 tag for Uighur and Uyghur is ug; see Codes for the Representation of Names of Languages so a different language code is not the solution.
This template uses Module:Lang to fetch the language name that matches the ISO 639-1 tag from Module:Language/data/iana languages which itself is taken from the IANA language-subtag-registry file. Both of Uighur and Uyghur are listed in Module:Language/data/iana languages. Module:Lang returns the first spelling, Uighur, because it is the first listed in the IANA registry. The text that I quoted above shows this because is uses Uyghur.
This template then looks for a category that uses the Uighur spelling: Category:Redirects from Uyghur-language terms. Because that category is a redlink, the template falls back to Category:Redirects from non-English-language terms. This template is not broken.
Two solutions occur to me:
  1. create Category:Redirects from Uyghur-language terms (then take Category:Redirects from Uyghur-language terms to WP:CFD)
  2. gain consensus to override the return value used by Module:Lang so that the module returns 'Uyghur' instead of 'Uighur'
Trappist the monk (talk) 18:49, 13 August 2022 (UTC)
Sorry about that, I had completely misunderstood what you said before. It seems like solution 1 is less likely to break stuff so I'll go with that. Cheers! TartarTorte 14:23, 14 August 2022 (UTC)
Wikipedia:Categories for discussion/Log/2022 August 14 § Category:Redirects from Uyghur-language terms
Trappist the monk (talk) 14:33, 14 August 2022 (UTC)

Template-protected edit request on 7 December 2022

Modify to the code to include specific calls for Katakana, Hiragana, and Kanji using the names defined in ISO 15924: Hira, Kana, Hani. Harmonia per misericordia. OmegaFallon (talk) 15:39, 7 December 2022 (UTC)

 Not done please sync, update, and test in the sandbox first; when ready reactivate the edit request. Thank you, — xaosflux Talk 15:58, 7 December 2022 (UTC)
Done. Harmonia per misericordia. OmegaFallon (talk) 01:20, 9 December 2022 (UTC)
I'm not convinced that this is necessary or desirable. Katakana, Hiragana, and Kanji are not languages but rather, are different systems for writing Japanese. The OP is not a request but rather a demand that does not justify why the ISO 15924 script codes Hira, Kana, and Hani should be used in place of the appropriate language tag ja.
Trappist the monk (talk) 02:06, 9 December 2022 (UTC)

Missing category for Norwegian Bokmål

 – Pointer to relevant discussion elsewhere.

Please see Wikipedia talk:Redirect#Norwegian Bokmål. --Redrose64 🌹 (talk) 11:37, 9 January 2023 (UTC)

"R from alt lang" listed at Redirects for discussion

An editor has identified a potential problem with the redirect R from alt lang and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2023 January 22 § R from alt lang until a consensus is reached, and readers of this page are welcome to contribute to the discussion. 1234qwer1234qwer4 13:35, 22 January 2023 (UTC)

"Template:R from Katakana" listed at Redirects for discussion

An editor has identified a potential problem with the redirect Template:R from Katakana and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2023 January 22 § Template:R from Katakana until a consensus is reached, and readers of this page are welcome to contribute to the discussion. 1234qwer1234qwer4 13:44, 22 January 2023 (UTC)

"Template:R from Hiragana" listed at Redirects for discussion

An editor has identified a potential problem with the redirect Template:R from Hiragana and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2023 January 22 § Template:R from Hiragana until a consensus is reached, and readers of this page are welcome to contribute to the discussion. 1234qwer1234qwer4 13:45, 22 January 2023 (UTC)