Jump to content

Template talk:Interlanguage link/Archive 3

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 06:42, 10 August 2021 (Archiving 1 discussion(s) from Template talk:Interlanguage link) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Archive 1Archive 2Archive 3Archive 4Archive 5Archive 6

Automating this template with WikiData?

I like how this template changes from a redlink to a bluelink when a page is created on EnWiki. It got me thinking: Is there a way to extend this functionality? So if I use {{ill}} and I specify only |ceb=, but then later an article is created at the Finnish wiki and connects it on Wikidata, could that be added to the link automatically somehow? Maybe by checking for other sitelinks on the wikidata entry? If the interwiki links update on every article's sidebar, couldn't that happen for this template? --Nessie (talk) 19:47, 6 November 2019 (UTC)

That would lead to a lot of clutter, if there are multiple other wikis that have an article. I think it makes more sense to pick one, possibly two but not many, where there is a decent article on the topic. Nikkimaria (talk) 01:55, 7 November 2019 (UTC)
Agreed; automatically linking to every language article could potentially lead to dozens of links being added, and I can see at most five links being useful; after that it's just clutter. Primefac (talk) 02:32, 7 November 2019 (UTC)
@Nikkimaria and Primefac: Are there many articles using {{Ill}} that have ‘dozens’ of interwiki links and no enwiki link? Also a cap could be put on, to limit it to say 4 links. --Nessie (talk) 03:28, 7 November 2019 (UTC)
Hmm, I'm wondering what kind of articles would not exist at English WP but exist at multiple other language wikis? I find in most cases that articles not existing here may be created at one or two other wikis, usually based on the subject's nationality, as in a French actress mostly notable in France. Enwiki is the most robust of the lot, I can't imagine there are many articles on books or people that have been created in more than two languages but not in English.— TAnthonyTalk 03:35, 7 November 2019 (UTC)
I will admit, I was being slightly hyperbolic, as by the time you got to more than 3-4 cross-language links it would be likely that one would exist in enwiki. We used to have a tracking category that listed how many outgoing links were listed, but it was removed. In truth, I don't think I've ever seen more than 5 links via this template.
In thinking it over, I agree that it would be fairly easy to set a cap on how many WD-provided links are used. My only question, though, is the usual one with regards to WD: how will these links be vetted? Goodness knows we get enough terrible articles on enwiki; maybe we don't want a link to the one-sentence BLP-violating article on Jeremy Hillary Boob PhD from the xyz-wiki. In other words, if an editor links it one can assume that it's a halfway-decent article; doing so automatically guarantees nothing. Primefac (talk) 11:32, 7 November 2019 (UTC)
@TAnthony and NessieVL: I'm getting timeouts when trying to expand or alter the query atm, but this sample shows over 1000 instances of a Canadian subject with sitelinks to at least 3 other wikis and none on English. I'd expect similar results, if not more since Canada is largely English-speaking, for subjects from other countries. Nikkimaria (talk) 12:46, 7 November 2019 (UTC)
  • Oppose I am strongly against any automated links via Wikidata. Other language wikis do not have the same number of editors, and often do not succeed in upholding core policies, including BLP requirements. Futher, there are few editors at Wikidata, and little or no oversight of added links. In areas in which I edit, many Wikidata items have incorrect or inappropriate inter-wiki links. Editors adding links take responsibility for doing so. Automating via Wikidata means no-one takes responsibility. Peter coxhead (talk) 15:35, 7 November 2019 (UTC)
  • Oppose as per Peter. Even the present system is confusing for casual readers, it's not clear intuitively what the red and cryptic blue letters mean. Would a Japanese student know that "[es]" is a link to the Spanish WP, or even more confusingly "[uk]" is Ukrainian? Martin of Sheffield (talk) 10:00, 14 November 2019 (UTC)
    • See List of ISO 639-1 codes. Tooltips showing the (English) name of the language may be helpful for people unwilling to familiarize themselves with these codes, but they would obscure the default tooltip of each page's article's foreign-language title (which may often differ from its future English-language title) if used. ―cobaltcigs 18:16, 29 February 2020 (UTC)
  • Wholeheartedly support if technically feasible. This would save a lot of hunting and pecking, especially for pages in languages using non-Latin scripts (which tend to be under-represented in the current system, simply because they're harder to manually search for). ―cobaltcigs 18:16, 29 February 2020 (UTC)

This would allow prioritizing the creation of articles according to demand, e.g. Category:Pages using Template:Interlanguage link with 3 languages (pls adjust phrasing as appropriate). ―cobaltcigs 18:16, 29 February 2020 (UTC)

@Cobaltcigs: Category:Interlanguage link template link number was deleted in September 2019 on account of not serving a purpose. However, it would be possible to restore that category if you think this would be a worthwhile purpose. Jc86035 (talk) 19:01, 29 February 2020 (UTC)
Hmm… I suppose periodic database reports might be more useful, in that the list of titles would correspond to the missing pages, rather than to existing pages that refer to them. You know, because you can't populate a category with red links. The problem would lie in relying on someone to actually generate the reports. ―cobaltcigs 19:14, 29 February 2020 (UTC)

Topics like this:

This really does happen. ―cobaltcigs 22:28, 29 February 2020 (UTC)

Implement language code recognition?

It'd be helpful if the template recognized the language codes ("de", "fr", etc.) so it wouldn't matter in which order you type the code and the article's name -> then both {{ill|de|Charlie B. Brown|fr|Charlie B. Brown}} and {{ill|Charlie B. Brown|de|Charlie B. Brown|fr}} would produce the same result. 2001:999:71:4987:5D5B:A034:22F7:9E93 (talk) 20:53, 29 November 2019 (UTC)

I can imagine someone wanting to link to de:fr or fr:de :) —Kusma (t·c) 21:10, 29 November 2019 (UTC)
(OP) When wikilinking to other language, the language code comes first (like this: [[:de:Article]]), which is probably the reason why I always struggle remembering the correct order for this template. Seems I'm not the only one: [1] 85.76.150.65 (talk) 17:41, 30 November 2019 (UTC)
But that is the order the template uses if the English Wikipedia article name is different: For example, in List of members of the 19th Bundestag, there is {{ill|Bernhard Daldrup|de|Bernhard Daldrup (Politiker, 1956)|la|Bernhardus Daldrup}} to join Bernhard Daldrup with de:Bernhard Daldrup (Politiker, 1956) and la:Bernhardus Daldrup. The form {{ill|article name|de}} is just a shortcut if the article titles are the same on both Wikipedias. —Kusma (t·c) 17:53, 30 November 2019 (UTC)
That, I believe, is the reason why it was coded that way initially. The first param is the en-wiki value, followed by (essentially) <lang>|<name> on repeat, which is how we generally link things as mentioned above. Primefac (talk) 19:39, 30 November 2019 (UTC)

A far more robust syntax would be this:

  1. Convert the language codes into named parameters.
  2. Recognize only two numbered parameters—{{{1}}} the English page title, {{{2}}} the link text—to form the first link like [[{{{1}}}|{{{2|{{{1}}}}}}]].
    • Note: Keeping |lt= as an alias for {{{2}}} will not be feasible because lt means Lithuanian.
  3. Use a Lua module to validate, and alphabetically sort, the language codes.
  4. Display an error when any parameter name does not correspond to any language code.
Example
input output
{{ill|Charlie B. Brown (actor)|Charlie B. Brown|de=Charlie B. Brown (Schauspieler)|fr=Charlie B. Brown (acteur)}}
Charlie B. Brown [de, fr]

I believe could write such an overhaul myself in a few hours, if there is sufficient interest. ―cobaltcigs 18:16, 29 February 2020 (UTC)

Please do not change the way parameters are used in this template again. The previous change was extremely disruptive – not again. The proposed syntax will make for extra typing if the subjects have the same name across Wikipedias, which is mostly true for organizations and buildings, and even for most people. Your example below can be written as
{{ill|Robert Ménégoz|ca||de||fr|}}: Robert Ménégoz [ca; de; fr].
If you feel the syntax you propose is worth having, please implement it in a different template. -- Michael Bednarek (talk) 01:40, 1 March 2020 (UTC)

Question

Hello,
I'm trying to link to the article of the TV show Nulle part ailleurs on French Wikipedia but it is redirected to a different article with the same name (an album) on English Wikipedia; is it possible to force a redlink or directly redirect to French Wikipedia? Thanks. - Myxomatosis57 (talk) 16:44, 18 March 2020 (UTC)

You should use the same approach that has been used at Alex Berger: {{ill|Nulle part ailleurs (TV program)|fr|Nulle part ailleurs|lt=Nulle part ailleurs}} which gives Nulle part ailleurs [fr]. In the long run, when such an article will be written on the English Wikipedia, that article should usurp the REDIRECT at Nulle part ailleurs because all incoming links there seem to be for the TV program. -- Michael Bednarek (talk) 01:21, 19 March 2020 (UTC)

Is Template talk:Interlanguage link/Old version/doc where it should be?

I'm finishing up a large cleanup on Category:Template documentation pages, and ran across Template talk:Interlanguage link/Old version/doc as one of only about a half dozen pages out of nearly 31k sitting in the template talk namespace instead of the template namespace. Looking at the page, it looks like there's some history involved, so I have several questions that someone here can answer: 1) does that page need to be saved for any reason? 2) is that the correct place for that page? 3) does it belong in Category:Template documentation pages any more? Thanks for your help in resolving this oddity. VanIsaacWScont 23:11, 3 May 2020 (UTC)

It's the pre-merge /doc for this template; not sure why a) it was saved or b) it got moved to the template talk space. I've G6'd it. Thanks. Primefac (talk) 23:17, 3 May 2020 (UTC)

Does notability matter?

To me, a redlink implies that, sooner or later, an English wikipedia article should be created. What if the subject lacks notability in the Anglophone Wikisphere? Don't create a link at all? Use purple links? Vagabond nanoda (talk) 20:09, 6 April 2020 (UTC)

If a subject is mentioned in an article here, there is obviously some notability. It may not be enough to have an article here, but it may well be. In any case, a link to an article in another Wikipedia at least gives the interested reader a chance to deepen their understanding of the topic. I don't think it does any harm (except in cases where blatantly promotional articles have been created in those other Wikipedias). -- Michael Bednarek (talk) 02:02, 7 April 2020 (UTC)
For a period, on Swedish Wikipedia, there was a template which showed a black linkless text plus the interwiki super-scripted link, intended for things that does exist on a foreign wiki but not notable to have on Swedish wiki. It was removed later. On Swedish Wikipedia, there is a discussion on removing Template Interlanguage link since some find it visually disturbing to have such superscripts in the middle of sentences. For this reason a variant with smaller font for the interlanguage link was created, usable in literature and other areas where people are more sensitive to style. Red links to non-notable things also irritate people. Should English Wikipedia support such variations?--BIL (talk) 15:23, 8 May 2020 (UTC)

Not properly working?

Hello, https://en.wikipedia.org/wiki/Boise_Airport#Passenger has the template written as such : {{ill|Stanley Airport|ceb|Stanley Airport}} but the link given is wrong (refers to another Stanley airport in enwiki?!? whilst it should give https://ceb.wikipedia.org/wiki/Stanley_Airport). --Bouzinac (talk) 19:02, 16 July 2020 (UTC)

More info is at Template:Interlanguage link#Modifying the display, but basically you need to give a different link to trick the template into forcing the interwiki display. I've updated the link and it's working as intended. Primefac (talk) 21:23, 16 July 2020 (UTC)

Foreign WP-article as author-link parameter in citation

Is it possible? As example, at Günter Bechly there is a cite written by Ernst Probst [de], is it possible to author-link that somehow? The publisher also has a German WP-article. Gråbergs Gråa Sång (talk) 12:49, 30 July 2020 (UTC)

Not with standard citation templates. They disallow the use of {{ill}} in |authorlink=. A workaround is not to use them, and write the citation manually; then that template can of course be used. -- Michael Bednarek (talk) 13:21, 30 July 2020 (UTC)
Thank you, that was about what I was expecting. Gråbergs Gråa Sång (talk) 13:26, 30 July 2020 (UTC)

Why doesn't this work?

Why does this work

Hooglede town hall [nl]

and this not work, displaying "Trève" instead of "trèves"?

Trève [fr]

I'm sure it's simple, I just need another pair of eyes. Maproom (talk) 10:24, 6 August 2020 (UTC)

You might not be reading the documentation correctly. In the second case it is linking to Trève here and to fr:trèves at the French Wikipedia. Johnuniq (talk) 10:37, 6 August 2020 (UTC)
fr:Trèves is a disambiguation page; which Trèves do you want to link to? Or do you mean fr:Trève? -- Michael Bednarek (talk) 11:00, 6 August 2020 (UTC)
I want to link to fr:Trève, but to have the result appear lower-case and plural. I could do it like this: trèves. But I thought that the use of interlanguge links was encouraged, and the :fr: stuff deprecated. Maproom (talk) 11:22, 6 August 2020 (UTC)
It's simple, first parameter the name you want in English, second para the two-letter language code, third para name in that language (only needed if different from name in English), and then comes what you need when it should show differently from name in English, |lt= (short for link text, so here ill Trève fr lt=trèves, trèves [fr].
Just insert "lt=" before the name to be shown. All this should be in he documentation. --Gerda Arendt (talk) 11:31, 6 August 2020 (UTC)
Ok, I see one of my mistakes now, I had "Trève" and "trèves" the wrong way round. Let's try these trèves, Trève, trèves [Trève]. No, none of them works. I'll stick with trèves. Maproom (talk) 11:47, 6 August 2020 (UTC)
Don't know. First and most important question: what should the English article name be, Trèves (WHAT)? It needs some dab, somthing in brackets describing what this meaning is. Or an English word. I don't speak French, sorry. --Gerda Arendt (talk) 11:54, 6 August 2020 (UTC)
You can force the link with |display=1, so {{ill|trèves|fr|Trève|display=1}} becomes trèves [fr]. Primefac (talk) 12:29, 6 August 2020 (UTC)

Expensive parser function

Pages like List of villages in Rivne Oblast (as of 22:45, 25 September 2019 ) that call this many times may exceed Wikipedia's limit of 500 "expensive parser functions."

For example, the call to {{ill|Vychivka|uk|Вичівка}} will count as one "expensive parser function."

I don't know WHY this works, but I have determined that changing the lines to {{ill|Vychivka{{!}}Vychivka|uk|Вичівка}} by simply adding {{!}} followed by a repetition of the name of the English-language page will eliminate the expensive parser function.

However, there may be good reasons NOT to do this, besides the obvious one of it being confusing to editors, causing many to say "This looks redundant, let me take out the {{!}}..." and unintentionally "un-fixing" the problem.

Anyone have any ideas on ways to cut down on the number of expensive parser function calls? Anyone understand this template well enough to add "if you call this template this way ... you will cost one 'expensive parser function' call, consider doing it this way ... instead" to the documentation page?

I also added {{expensive}} to the template's documentation page. davidwr/(talk)/(contribs) 17:59, 14 August 2020 (UTC)

The correct way to handle this is by painfully fixing the links. Some links will now exist as articles at enwiki, so the {{ill}} can be replaced with a normal wikilink. Some links might not exist at enwiki or ukwiki, so {{ill}} could be replaced with no link. A gigantic example of the former is explained here. I asked why your trick works here. Johnuniq (talk) 00:17, 15 August 2020 (UTC)
For the record, I'll note that the answer from Jackmcbarn was that #ifexist starts by noting that its parameter contains a character ("|") that is not valid in a title, so it returns false without bothering to check if the page exists. Johnuniq (talk) 23:55, 15 August 2020 (UTC)

Edit request to reduce expensive parser function calls

Please review and add this Sandbox diff to the template.

The goal is to eliminate the expensive parser function calls to #ifexists and the expensive call within #invoke:redirect|isRedirect in situations where we know we don't care, namely, when |display= or |preserve= are set to any value.

Primary use case: In "list-type" articles, there is already an advantage to using |display=1 (or any non-blank value) to preserve the inter-wiki links for pages that have an article in the English Wikipedia. These same types of articles are the type that are likely to exceed Wikipedia's 500-limit for expensive parser function calls. The "driving example" is List of villages in Rivne Oblast (discussion).

I've updated the testcases for this template. Here is a version that shows that, with the change, there are no expensive parser function calls with |display=1 or |preserve=1.

Additional testing of the underlying change can be found at my sandbox as of 20:18 15 August 2020 and the testcases for it at my sandbox2 as of 17:20 15 August 2020.

Once this is done, please "ping" me and I will update List of villages in Rivne Oblast. davidwr/(talk)/(contribs) 20:53, 15 August 2020 (UTC)

@Jackmcbarn: Would you mind having a look at this request. Johnuniq (talk) 23:51, 15 August 2020 (UTC)
 Done Yep, that's exactly what was needed to properly fix this. (By the way, this template is crying to be converted to Lua. I might do that at some point now that I see what a mess it is.) Jackmcbarn (talk) 00:33, 16 August 2020 (UTC)
Thank you. I've updated List of villages in Rivne Oblast. It no longer "breaks the Wiki." davidwr/(talk)/(contribs) 01:18, 16 August 2020 (UTC)

I've developed a script which finds red link titles on the page the user is editing, searches for them on wikidata, prompts the user to choose the correct wikidata item (if any), then changes each red link to an instance of {{ill}}, populated with interlanguage prefixes/titles fetched from the selected wikidata item. Testing/feedback is welcome. ―cobaltcigs 09:41, 3 October 2020 (UTC)

How to initiate the script? I have just add it to my common.js and Bypassed my cache, but nothing happened.Jklamo (talk) 23:08, 5 October 2020 (UTC)
While editing a page you should see a new tab titled "ill", clicking on which should display a table of links in place of the editing textbox. If using the vector skin (never recommended), this may be hidden in the "more" menu. ―cobaltcigs 00:29, 9 October 2020 (UTC)

You might be interested in the following discussion:

User talk:Kanashimi#Task 1 Convert interlanguage link templates with local article to wikilinks

CapnZapp (talk) 11:32, 25 October 2020 (UTC)

Improve syntax

Could the syntax be improved so that the sitelinks on Wikidata are used to provide the correct links? In other words

{{Interlanguage link|WD=Q3588672|es|fr}}

would produce Émile Morlaix [es; fr] preferably with the link to Émile Morlaix (Q3588672) too? — Martin (MSGJ · talk) 13:03, 8 October 2020 (UTC)

Gotta look into the code for a second, but the coded text above gives es [Wikidata]. With {{Interlanguage link|Émile Morlaix|es|fr|WD=Q3588672}} you get Émile Morlaix [Wikidata]. Primefac (talk) 18:24, 8 October 2020 (UTC)
Okay, looked at the code, and the archives, and I feel like the primary purpose of the WD links was if there weren't other languages (which I somewhat mangle in this discussion but I can't find what I was looking for). Basically, I would think that if there are 1-2 links to other languages, we don't really need to have a link to WD in addition to that.
So... to answer the original question, yes it can be done. To ask a follow-up question, do we want this to be done? Primefac (talk) 18:50, 8 October 2020 (UTC)
Existing behavior should remain unchanged, but the new behavior would be desirable as well. I recommend adding a new parameter |WDget= with values of |WDget=basic which would be the same as no WDget parameter at all i.e. the current behavior, |WDget=wikipedias which would show all of the Wikipedia language links in the same order they are in WikiData, and |WDget=both which would do both.
The end result would look something like this: {{Interlanguage link|Émile Morlaix|WD=Q3588672|WDget=both}} -> Émile Morlaix [Wikidata; es; fr]. davidwr/(talk)/(contribs) 20:14, 8 October 2020 (UTC)
That was previously discussed (see the discussion I linked above), and it was decided not to import WikiData information directly. Primefac (talk) 20:31, 8 October 2020 (UTC)
Proposal - a separate, always-subst'd template that generated a list of parameters based on what is in WikiData at the moment it is used. For |1=Q3588672 this new template would generate es|Émile Morlaix|fr|Émile Morlaix. This way, I could just do
{{Interlanguage link |Émile Morlaix |{{subst:newtemplatenamegoeshere |Q3588672}}}}
and know that the current list from WikiData would be imported, but that it would be immune from being hijacked by future WikiData edits. As an alternative to the Q entry, this new template should allow the name of an English or other-language Wikipedia entry that actually exists, such as
{{Interlanguage link |Émile Morlaix |{{subst:newtemplatenamegoeshere |es:Émile Morlaix}}}}
davidwr/(talk)/(contribs) 20:55, 8 October 2020 (UTC)
This has the potential, which was discussed in the previous discussion, to result in a dozen different interwikis being linked. I'm not strictly opposed to this idea, but I feel like it's going to be way more hassle than it's worth, just for the minor benefit of catching random languages like vi or sr. Primefac (talk) 21:14, 8 October 2020 (UTC)
Back to the original proposal: How about if the template uses a "snapshot in time" version of WikiData, so
{{Interlanguage link|WD=Q3588672|es|fr|UseWD=1}}
self-substitutes and renders as
{{Interlanguage link|es|Émile Morlaix|fr|Émile Morlaix}}
This would make it much easier on all editors, as they wouldn't have to look up the page name, but it would not have the problems of "a bunch of language links" or the problem of the language link changing out from under them if someone vandalized WikiData. Editors would need to be reminded to check their edit though, just to be sure WikiData wasn't vandalized 0.1 seconds before the editor published the edit on the English Wikipedia.
If self-substitution is too hard, maybe a new template called {{interlanguage link2}} can be written which MUST be substituted, resulting in a conventional use of the current {{interlanguage link}}.
For situations where there is already an English-language page and the non-English version is desired as well (e.g. with redirects or when |display= or |preserve= are used), the |WD= parameter would be optional, if it is missing, the English page name would be used to get the WikiData entry. davidwr/(talk)/(contribs) 22:03, 8 October 2020 (UTC)
I'd like to see the above-described functionality added, but have no faith in that ever happening. That's why I created a user script to expedite the otherwise tedious process of searching wikidata.org for a title, identifying the correct wikidata item from potentially numerous choices, collecting the foreign-language prefixes and titles from that Q-number page, populating these into an {{ill}} template call, and inserting that code in place of a regular red link. All without opening a dozen tabs or displacing something important from your system clipboard. See previous section.
This is, of course, an imperfect workaround because unlike a "live" Q-number lookup, it will not update itself when new language entries are added. Such updates would be a suitable bot task, once the initial (and necessarily human) identification of the correct item has been done.
Note that "showing too many language links" after a red link isn't a problem in itself; it's just a rather embarrassing symptom of allowing enwiki to fall behind that many other-language wikis. In the credits of foreign film stubs, I commonly find red links on enwiki where 4–5 other wikis have a bio. Such omissions really should be made as glaring as possible, to encourage somebody fluent in one of these languages to translate at least a stub for us locally. That is, by far, the most constructive way to make a ghastly list of language codes go away.
De-linking to plain text is the absolute worst, but (frustratingly) some users do that too.
cobaltcigs 20:21, 25 October 2020 (UTC)

{{Wikidata red link}} is a fairly new template with similar functionality with respect to Wikidata. It doesn't have the inter-lanaguage linking that that {{interlanguage link}} has, but there is enough overlap that a merger should be considered.

If nothing else, when and if either template is rewritten as a module, that might be a good time to "do the merger." davidwr/(talk)/(contribs) 22:56, 25 October 2020 (UTC)

Category

It took me a while to find this template. I knew I had seen it in use bout could not find it. Should it be in Category:Language templates? --Error (talk) 13:13, 18 November 2020 (UTC)

Is there a way to add an option that makes the English link redlinked (and preferably wrapped in Template:No redirect) if the article on English Wikipedia is a redirect? The main use case for this when trying to avoid circular redirects. Jumpytoo Talk 03:13, 30 August 2020 (UTC)

  • In a word, no. If it is a redlink, it will show as a redlink. If it's a redirect, it will show as a normal link (unless you have a link classifier, so for example mine shows up green). But, remember that if it is a redirect it will still show the interwiki links, indicating that it is a redirect. Primefac (talk) 12:09, 30 August 2020 (UTC)
  • @Ganbaruby: As Primefac said, you can't make the link red, but you can do the next best thing - turn it black or suppress the redirect. I gave it a go and it's harder than it looks unless you want to have yet another expensive parser function call. Here are several approaches to take. Each involves having a new parameter |suppressredirects=. In each case, change the code so if "suppressredirects" is set, do the following:
  • Rewrite it as a module or module-based template. This may be the best approach.
  • Re-factor it so the check for {{#ifexist:{{{1|}}}|{{#invoke:redirect|isRedirect|{{{1|}}}}}|1}}}} happens earlier and it "wraps" the rest of the logic. Note that this code returns "1" if the page |1= does not exist, "yes" if it is redirect, and nothing if it is a non-redirect page. I looked at this option and it's pretty involved, more than I can do in an hour. I think it will also result in duplicate code, which makes maintenance a problem.
  • Bite the "expensive parser function" bullet and do that check twice, once where it's currently being checked, and once earlier, before where the en-wiki link is printed. Something like this might work (NOT TESTED!): {{#if:{{{suppressredirects|}}}| code to check for a redirect and if it is one, make the link look like we want }} existing code to display the link {{#if:{{{suppressredirects|}}}| more code check for a redirect and if it is one, make the link look like we want }}. This would be at least two expensive parser functions. To save on an expensive parser function call, I recommend using this in conjunction with |display= and possibly modifying the code above.
In any of these cases, my recommendation would be to surround the en-wiki link with {{noredirect|...}} if - and only if - the file exists.
As I am writing this, I have an idea but I need to wait until later today to try it out. If it works, you will be able to do what you want without any additional expensive parser function calls or duplicate code. davidwr/(talk)/(contribs) 18:19, 25 October 2020 (UTC)
  • @Ganbaruby: I put some alpha-state code in the sandbox, it implements |suppressredirect= which will wrap links with {{noredirect|{{{1}}}|{{{lt}}}}}. |lt= is optional. It's not "red" but at least it keeps the circular redirects at bay. I did notice that Module:redirect has a way of determining the target of the redirect. This means in principle, you could write a version that would check to see if the target was the current page and if so, do something special. Temporary documentation including a to-do list are in html comments at the top. Parser profile test results are in an older edit, clearly labeled in the edit history. I've also added half a dozen testcases.
TO DO LIST: (any volunteers?)
  • Have someone who knows safesubst: go through and add it where needed and check it where it's already there.
  • Have another experienced template editor review the new code closely, both for errors and opportunities to make it more efficient.
davidwr/(talk)/(contribs) 21:17, 25 October 2020 (UTC)
  • @Jumpytoo: I changed the sandbox code so I think it meets your needs. I took out the just-added support for |suppressredirect= and replaced it with a new parameter, |useredirect=. If you use it, the target of the redirect will be the wikilink. You can still "mask" it with the existing parameter |lt=. I'm going to add another parameter called |maskredirect= which, if set, will cause |1= to be used as the "wikilink mask" if |lt= is not set. davidwr/(talk)/(contribs) 00:31, 26 October 2020 (UTC)
Thanks, I've played around with it and I'm not sure how to achieve the red/no redirect effect with the new params. Is there an example you can show? Jumpytoo Talk 01:34, 26 October 2020 (UTC)
  • @Jumpytoo and Ganbaruby: Template:Interlanguage link/sandbox is "stable" (permalink) at least I don't PLAN on making changes to it for the next 10 hours at least, it's got preliminary documentation in html comments at the top. I made this test revision, since reverted, of Hololive Productions. You can see in the collapsed tables in the "Talents" section that redirects are in bold black, but still show the name used by the editor. This is done by a combination of the new |useredirect=1 and |maskredirect=1 parameters.
This change is not ready to be merged yet. Besides getting agreement if this functionality is wanted, there is a technical TO DO LIST:
  • Make sure it can be safely substituted. I am not experienced in this area so I didn't try hard to get it right.
  • Have a code review by someone experienced with templates. I've been mistake-prone today so to be blunt, I don't trust my own work today.
  • Make sure when the new parameters are NOT used, the parser profiling usage is about the same as the existing version. In other words, no surprised with template post expansion include size, parser function count, etc. etc.
davidwr/(talk)/(contribs) 02:04, 26 October 2020 (UTC)
@Jumpytoo and Ganbaruby: Do either of you want this enough to go forward with adding |useredirect=1 and |maskredirect=1? If not, I'll drop it as "not needed now, let's keep things the way they are until there is a need."
@all: If either of them answer yes, I need one or more volunteers who knows how to make substitution safe to proofread this and fix it up. Once it's been fixed and checked, we can go live, but only if there is a current need for this. davidwr/(talk)/(contribs) 23:01, 26 October 2020 (UTC)
I am still supportive of this feature. While I am fine with the feature as is, looking into if it's possible to add CSS + no-redirect link would be appreciated. Also, is there a use case for only using one of the params and not the other? Jumpytoo Talk 01:27, 27 October 2020 (UTC)
@Davidwr: Thanks for the hard work. I like it! Couple things: in an instance of a circular redirect, is there any way for the link to not be bolded when useredirect is set? Also, is there any reason why someone would have useredirect but not maskredirect?  Ganbaruby! (Say hi!) 11:38, 27 October 2020 (UTC)
@Jumpytoo and Ganbaruby: Wikimedia software turns a link to the current page into a non-clickable bold link: [[Template talk:Interlanguage link|Template talk:ill]] renders as Template talk:ill. There is a "cheat" which is to replace the link with the URL version, something like [{{canonicalurl:Template talk:Interlanguage link}} Template talk:ill}}] renders as Template talk:ill. As for use cases, there are use cases for just useredirect without maskredirect but on reflection, they are probably uncommon. It might be worth "reversing the logic" so |maskredirect= is replaced with |exposeredirect=, so by default |1= is what the person sees by default when |useredirect= is used. Thoughts? davidwr/(talk)/(contribs) 12:57, 27 October 2020 (UTC)
@Davidwr: I read the above discussion and tried out the new parameters, but I am still confused.
In the specific case of Tokino Sora at Hololive Production#Talents, is there a way to make the display look exactly like Tokino Sora [ja] (with a non-clickable, non-bold display)? I think Tokino Sora [ja] is an undesirable result, and would like to avoid it unless there is a technical/intentional reason against it. — Goszei (talk) 22:02, 20 November 2020 (UTC)
@Goszei: The bold comes from the fact that the wikilink is actually to the current page. That is, Tokino Sora redirects to Hololive Production. If you want "no bold, no click, no color" behavior, the sandboxed version will need to be changed to specifically check to see if the redirect target is the current page, then NOT put in a wikilink. That could get complicated, but it's certainly do-able. davidwr/(talk)/(contribs) 22:12, 20 November 2020 (UTC)
@Davidwr: I personally support such a feature. — Goszei (talk) 22:16, 20 November 2020 (UTC)
If you don't want a link, don't put a link, just put a {{small|{{bracket|[[ja:ときのそら|ja]]}}}} after the name, which will give you your [ja]. Primefac (talk) 22:19, 20 November 2020 (UTC)
Courtesy ping to @Kanashimi: The changes being discussed above will not be "breaking changes" (well, not if done properly), so they should not affect Cewbot, but you might want to at least skim the discussion and see the html comments at the top of the sandbox. If you see any potential problems, please jump in so we don't break anything. davidwr/(talk)/(contribs) 22:47, 20 November 2020 (UTC)
Thank you for reminding. It is OK, the bot only parse the parameters and will not care the CSS or HTML codes. --Kanashimi (talk) 23:53, 20 November 2020 (UTC)

Use CSS?

You could give this template a TemplateStyle (CSS) subpage containing a.mw-redirect { color: WHATEVER; }. But this rule will actually "leak out" and affect other ("normal") redirects elsewhere on the page where the template is used (I just tested this on a localhost wiki). That can be avoided by wrapping the entire template output in something like <span class="ill">...</span> and using more specific CSS like span.ill a.mw-redirect { color: whatever; } to only affect redirect links inside such a span.

Note that any color selection here will probably annoy users who've added their own CSS and therefore expect all redirects to be the same color of their own choosing, regardless of whether they're formed [[Like this]] or {{ill|Like this|es|Como esto}}. Such users would need to opt out by adding another line in their CSS to override this new (more specific) rule to also use color they like, or by adding !important to their existing (less specific) rule. This should be explained in the docs if we do it.

The above caveats aside, perhaps some shade of purple would make the most sense? ―cobaltcigs 11:15, 26 October 2020 (UTC)

Am I mistaken, or is there currently no option to suppress the link on enwiki? This would be useful in cases like Flappy Bird: Dong Nguyen (see infobox) is ill'd to viwiki, but the enwiki link is a redirect that loops back to Flappy Bird, creating a WP:CIRCULAR. IceWelder [] 22:59, 12 December 2020 (UTC)

There 2 obvious solutions: write a proper article at Dong Nguyen, or invent a disambiguator, say "(game designer)": {{ill|Dong Nguyen (game designer)|vi|Nguyễn Hà Đông|lt=Dong Nguyen}} -> Dong Nguyen [vi]. Or it could be left as is because it still provides the link to vi WP. -- Michael Bednarek (talk) 01:42, 13 December 2020 (UTC)
@IceWelder: Look up above to #Forcing redlink on redirect pages. Here's what the sandbox with the new parameters |useredirect=1 |maskredirect=1 does for Flappy Bird: demo
I never finished the changes because 1) the discussion fizzled out and 2) I'm not well-versed in safesubst: so I'm not willing to stand behind this. Here's the diff of the sandbox and the template as of a minute or so ago: diff
If this does what you want, we can re-start the conversation from October and get this reviewed by someone familiar with safesubst: then implemented. davidwr/(talk)/(contribs) 🎄 06:07, 13 December 2020 (UTC)
  • @Davidwr: That definitely goes in the right direction and is not so much a workaround. I tested the edit you made to Flappy Bird again, and I saw that the name was automatically bolded. I was unable to disable the bold with |nobold=, which might be a bug. However, I'm wondering whether it be easier to just have a param like {{{nolink}}} that disables the link altogether. This would be a quickfix for all cases like redirects and unwanted redlinks (for WP:RED violations). IceWelder [] 11:23, 13 December 2020 (UTC)
  • @IceWelder: The "bold" is a feature. because the actual link is to the page in question, for example [[Template talk:Interlanguage link]] renders as Template talk:Interlanguage link, a bold un-clickable would-be-a-blue-link-if-this-page-is-ever-moved "link." On the other hand, {{plain text|[[Template talk:Interlanguage link]]}} renders as Template talk:Interlanguage link.
As for your proposed |nolink= parameter: That's another reason I didn't move forward, there wasn't any clarity on whether the code I wrote was the best way to meet the needs of those who had the issue that was raised in October.
Do you have the skills to fix up any safesubst: issues in the sandbox? If you do, it should be easy take a fixed-up version and add |nolink=, which could just add a {{plain text}} wrapper to the English link when |nolink=1 or even a |noboldselflink=1 parameter that would turn off bolding if it were a "self-link" but otherwise do leave it alone. This is starting to get complicated though, so it's best to decide what is really needed before "making improvements just for the sake of making improvements." This is after all a protected template, which implies a higher cost if things go south. It also suggests that for the sake of future maintenance, simpler is better.
Another thing I do want to be careful about is the effect on the template WP:PEIS limit. This template is used in some large lists of non-English geographical locations. I added {{display}} a few months ago to get around the 500 expensive parser limit issue that affects these articles, I don't want to create a new problem. davidwr/(talk)/(contribs) 🎄 15:05, 13 December 2020 (UTC)
I might look into it later. Maybe converting the template to a Lua module could also fix this. IceWelder [] 08:29, 14 December 2020 (UTC)

Equal sign

Does the equal sign in an article title break this template? I'm trying to do

{{ill|Konaka = Pehlwan|ja|小仲=ペールワン}}

and I get this: ja [小仲=ペールワン]. The article in question is Umemura PC Juku Copy & Paste Championship

If this is the case, what is the workaround? Or is there an error I made that I missed?

Thanks, Oiyarbepsy (talk) 09:47, 2 January 2021 (UTC)

@Oiyarbepsy: try Konaka = Pehlwan [ja], which works, but where did you get the idea for an English Wikipedia article with an equal sign in it? That seems pretty non-standard. Mathglot (talk) 10:26, 2 January 2021 (UTC)
Not my article, but this is the wrestler's actual name (you'll see the equal sign is also in the Japanese name). Oiyarbepsy (talk) 22:25, 2 January 2021 (UTC)
For reference, Mathglot is using {{=}} in the template call instead of just =. Primefac (talk) 13:15, 2 January 2021 (UTC)
@Mathglot:@Primefac: Thank you very much. Oiyarbepsy (talk) 22:25, 2 January 2021 (UTC)
@Oiyarbepsy: I know this deviates from the question, but I don't think that full-width equals sign should be transliterated as an ASCII equals sign. The Japanese writing system already has the chōonpu, which looks like a hyphen, so traditionally a double hyphen is used to join two names. Unicode now has a code point for the Japanese double hyphen, but this is scarcely used or made compatible because pre-Unicode encodings for Japanese didn't encode a separate full-width equals signs and a double hyphen. This is why Japanese Wikipedia substitutes the full-width equals sign for the double hyphen, as recommended here, which gives the example クロード・レヴィ=ストロース for "Claude Lévi-Strauss". So the correct way to spell 小仲=ペールワン in Latin-based text is most likely "Konaka-Pehlwan". Nardog (talk) 08:44, 13 January 2021 (UTC)
Thank you, Nardog, I have revised the link accordingly. The Japanese writing system is certifiably insane. Oiyarbepsy (talk) 09:03, 13 January 2021 (UTC)
Um, Oiyarbepsy, I think I know what you meant, but can you strike your last sentence or tone it down, please? See WP:REDACT if you're not sure how to do this. Mathglot (talk) 21:16, 13 January 2021 (UTC)

Task 1 Convert interlanguage link templates with local article to wikilinks (again)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Apologies for any confusion, but the preceding talk section (now resolved) discussed a different matter than what I brought up at

User talk:Kanashimi/Archive 1#Task 1 Convert interlanguage link templates with local article to wikilinks

and then at

Wikipedia:Bots/Noticeboard#Should Cewbot remove interlanguage link templates once local articles exist?

Please respond either there or here. Cheers CapnZapp (talk) 14:55, 13 January 2021 (UTC)

(Inviting editors to splinter a discussion is bad practice.) I regularly edit articles with {{ill}} links and create them often. They can be sometimes elaborate in order to deal with foreign scripts or naming conventions (Hungarian), so the resulting Wikitext often looks frightening. Therefore, removing those constructs once local articles exists is a welcome cleanup task. Can anyone provide an example of an {{ill}}-linked article that was converted to a local link and the article was then deleted? -- Michael Bednarek (talk) 01:25, 14 January 2021 (UTC)
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Redirect red link?

I'm using this template to link to sv:Aska, Motala kommun—that is, the town of Aska, in Motala Municipality. The corresponding article in English, however, would have a different name, something like Aska, Sweden. Is there a way to use the {{ill}} template to have an end result that displays as "Aska [sv]" (redlink goes to Aska, Sweden), rather than as "Aska [sv]" (redlink goes to Aska, Motala kommun)? Thanks, --Usernameunique (talk) 07:21, 23 January 2021 (UTC)

@Usernameunique: Your redlinks go to the opposite of what you say but I think you want Aska [sv]. See Template:Interlanguage link#Displaying different text. PrimeHunter (talk) 08:00, 23 January 2021 (UTC)
Thanks, PrimeHunter, that's exactly what I was hoping to do. I had seen that section, but not appreciated that it could be used to change the direction of the redlink in addition to its display (that is, I was currently stuck at Aska [sv]). And you're right about my redlinks going to the opposite of what I said—I've edited it above. --Usernameunique (talk) 08:22, 23 January 2021 (UTC)

Can we add a parameter to de-link the page in en.wiki (keeping the foreign wiki link)? So something like "2018–19 [it]", instead of "2018–19 [it]". Nehme1499 (talk) 17:10, 19 February 2021 (UTC)

I feel like this has been discussed before, with "no" being the answer. If the page shouldn't be linked on Wikipedia, then we shouldn't be using this template. Primefac (talk) 23:18, 4 March 2021 (UTC)
There might be a technical reason for suppressing the enwiki link, such as it being a redirect to the same page. IceWelder [] 00:31, 5 March 2021 (UTC)
In that case it shows as a link with the interwikis, indicating that it's not "really" an article. Primefac (talk) 02:18, 5 March 2021 (UTC)
@Nehme1499:, there's a pretty good workaround that does what you want to do. You can just code this:
  • 2018–19{{ill|2018–19|it|Campionato Primavera 1 2018-2019|lt={{thinspace}}}}, to get:
  • 2018–19 [it]
Does that work for you? Or maybe simpler, just roll your own:
  • 2018-19{{thin space}}&#91;[[:it:Campionato Primavera 1 2018-2019|it]]&#93;
  • 2018-19[it]
Hope this helps. Mathglot (talk) 08:57, 26 March 2021 (UTC)
@Mathglot: Very nice workaround: thanks! Nehme1499 14:34, 26 March 2021 (UTC)

Draft param

Looking for feedback. I was thinking of adding a yes/no "draft" parameter. If |draft=yes, then if a draft exists in English for the article named in arg 1, then add a bracketed draft indicator. This would entail one expensive parser function call. Also, if draft=yes, standard detection would be used to generate an error if used in mainspace, as we don't want links to drafts from there. This could be useful, especially in lists of articles being contemplated for creation, we'd want to know if a draft exists. Naturally, that should be checked anyway; but having the link would be a convenience. This would be backward-compatible, and shouldn't have any effect on existing invocations.

Proposed example:

If no draft exists, it would not produce the link. Example of a page where this would be useful: this list of missing articles about women in en-wiki. Thanks, Mathglot (talk) 09:49, 26 March 2021 (UTC)

no change of code is needed for that:
  • {{ill|French Research Centre of the Arabian Peninsula|fr|Centre français de recherche de la péninsule Arabique|draft}}
French Research Centre of the Arabian Peninsula [fr; draft]
Or, if you like the "draft" link before the French Wikipedia one:
  • {{ill|French Research Centre of the Arabian Peninsula|draft|French Research Centre of the Arabian Peninsula|fr|Centre français de recherche de la péninsule Arabique}}
French Research Centre of the Arabian Peninsula [draft; fr]
But no, even though it is actually an existing feature, it should not generally be used (I mean: in mainspace): we'd try to avoid such links from mainspace to draftspace (also: when the draft would not, or no longer, exist, without there being an article, or with only a redirect, in mainspace that would leave a quite undesirable redlink in mainspace, e.g. French Research Centre of the Arabian Peninsula [fr; draft]). --Francis Schonken (talk) 10:10, 26 March 2021 (UTC)
@Francis Schonken: Oh, it must be a while since I've read the code, or it's changed a great deal since then! Well, if it already exists, then we simply need to add the namespace check to exclude it linking from mainspace. And one expensive parser function call would eliminate the other undesirable effect. I'll get to it at some point (not soon) if no one gets there first. Thanks, Mathglot (talk) 21:40, 26 March 2021 (UTC)
(edit conflict) I personally have no issues whatsoever, but I have a vague notion you need to discuss the concept of linking into draft space from main (article) space more widely before going ahead. Cheers CapnZapp (talk) 10:13, 26 March 2021 (UTC)
Thanks, but if you reread the proposal, linking to draft from mainspace is specifically excluded by definition. Although the proposal is moot, given Francis's comments above. Mathglot (talk) 21:43, 26 March 2021 (UTC)
Well, I posted my comment at the same time Francis' posted his (as indicated by the {{ec}} template), so the mootness was unknown to me at the time. As for the draft>>mainspace links I would guess this should be discouraged rather than prevented, based on the fact this is how it is already implemented. In short: maybe you need to do nothing, and you're good to start using the template for your intended usage? Cheers :) CapnZapp (talk) 09:18, 27 March 2021 (UTC)