Template talk:Interlanguage link/Archive 5

{{talkarchivenav}}

Support lang tag

{{Edit template-protected|answered=yes}}

I made a {{plain link|url=//en.wikipedia.org/w/index.php?title=Template:Interlanguage_link/sandbox&type=revision&diff=1071320106&oldid=1051504880&diffmode=source|name=sandbox edit}} that allows wrapping the link text in a {{t|lang}} template using a new {{para|lt-lang}} parameter (and an accompanying {{para|lt-rtl}} corresponding to {{tlg|lang|nolink=y}}'s right-to-left parameter). Currently the only alternative would be wrapping the entire {{tlg|ill|nolink=y}} template in a {{tlg|lang|nolink=y}} template, which would be semantically not entirely correct. ―Jochem van Hees (talk) 01:37, 12 February 2022 (UTC)

: Is this theoretical, or do you have some actual examples where you would need this feature? Mathglot (talk) 02:01, 12 February 2022 (UTC)

::Further, some testcases are needed. -- Michael Bednarek (talk) 04:00, 12 February 2022 (UTC)

:::Yeah, I was a bit intimidated by the complexity of that page so I just tested it on my own sandbox, but I'll look into actually adding some proper testcases now.

::{{Reply to|Mathglot}} seems quite logical to me that links to foreign languages are often foreign-language text. Just looking through the 'what links here' page, it seems most links are people's names, but there's also a lot of foreign-langauge names of organisations which should be tagged with {{tlg|lang|nolink=y}}. Examples I just found: Andorra ({{interlanguage link/sandbox|Castellers d'Andorra|ca|lt-lang=ca}}), Athens ({{interlanguage link/sandbox|Athinais Kypselis|el|Αθηναΐς Κυψέλης|lt-lang=el}}), Austria-Hungary ({{ill|Landesausschuss (Austria)|de|Landesausschuss (Österreich)|lt=Landesausschuss|lt-lang=de|italic=yes}}). I actually made this edit request after {{u|Matthiaspaul}} made an edit to Template:Lang/doc explaining the problem of not being able to combine this template with {{tlg|lang|nolink=y}}. ―Jochem van Hees (talk) 10:57, 13 February 2022 (UTC)

::: Actually, I very much support adding a {{para|lang[uage]}} parameter to {{tl|ill}} for the very reasons given. In fact, I thought about making a similar proposal, but just didn't have the time to write it down. {{tl|ill}} is very often combined with {{tl|lang}} for obvious reasons, but not all combinations work. It would be much more convenient (and also semantically more correct), if {{tl|ill}} would support the functionality of {{tl|lang}} right out of the box.

::: In many cases, the language would be the same as the language of the foreign wiki link, so in all cases where the same foreign language word would be used as our local article title, the language could be derived from the already given prefix. Of course, this would not be valid in all cases and this assumption would be invalid to make in most cases where the foreign and local link names differ.

::: Either way, for a start I would be happy with a separate language parameter already. To keep it simple, I would call the parameter {{para|language/lang/l}} rather than {{para|lt-lang}}, also for consistency with other templates using a language template (CS1/CS2 support {{para|language}} and {{para|lang}}, {{tl|r}}/{{tl|rp}}/ {{tl|ran}} additionally support {{para|l}}).

::: --Matthiaspaul (talk) 15:40, 13 February 2022 (UTC)

:::: I would call it {{para|lt-lang}} as originally proposed. This template is already busy with the concept of languages and foreign wikipedias, and is already complex—by which I mean not the code, but the large number of parameters available and the explanation of them in the doc—and it can all be a bit overwhelming for someone not used to it. I think clarity trumps any consistency of param naming, and my first question if I saw {{para|lang}} would be confusion: "what lang? isn't practically everything here a language?" By linking {{para|lt-lang}} through its name to {{para|lt}}, I feel that it's pointing me in the right direction, and I wouldn't feel so unmoored. Don't get me wrong—I'm a big believer in consistency, including in param names: I'm active at Welcome Templates, and lack of consistency in param naming is one of my pet peeves there—however I'm a bigger believer in clarity and ease of use for the user, and in this case, I believe clarity trumps consistency and the user would not be well served by a param name similar to other templates which might be more likely to be confusing than helpful to the user of this one. Mathglot (talk) 18:02, 13 February 2022 (UTC)

::::: I'm a believer in consistency and clarity as well ;-)

::::: I also see your point, having asked myself too the question if we'd need more than one language parameter.

::::: However, I came to the conclusion that the only thing than could actually need to be tagged with a language tag is the label text displayed by the template, not the (possibly different) underlying local link target and not the inter-wiki link symbolized by that "[??]" thing, which, at least for me, is something conceptually so different that I would hardly confuse the two parameters.

::::: However, speaking about the current parameter interface and clarity, I consider it rather unintuitive - probably as a result of its merging history. While I'm not against keeping the unnamed parameter interface, I think, we should have at least the option to provide all parameters as named (and optionally enumerated) parameters as well. If they were available I would immediately switch to use only named parameters. Something like {{ill|wiki-link/link/wl=Athinais Kypselis|label-text/label/lt=Athinais Kypselis|label-language/label-lang/language/lang/ll=el|inter-wiki-link/iwl=:el:Αθηναΐς Κυψέλης}}. {{para|lt}} would be needed only to override the default label text (of {{para|wl}}). The label text would be language-tagged only if {{para|ll}} is given. If {{para|iwl}} would only specify the prefix, the contents of {{para|wl}} should be assumed for the foreign link as well. And if {{para|iwl}} is given without a prefix, the prefix would be taken from the {{para|ll}} parameter. If {{para|iwl}} isn't given at all, the prefix should be derived from {{para|ll}} as well, and the link from the {{para|wl}} parameter. {{para|iwl}} could be an enumerated parameter to support multiple iwls. If only {{para|iwl}} would be supplied, the {{para|wl}} link could be derived from this as well, so that no information needs to be doubled and the user would not have to specify more parameters than necessary. Something along this line.

::::: --Matthiaspaul (talk) 22:04, 13 February 2022 (UTC)

: File:Red information icon with gradient background.svg Not done for now: please establish a consensus for this alteration before using the {{tlx|edit template-protected}} template. Mathglot (talk) 21:19, 12 February 2022 (UTC)

:: Housekeeping note: I've reset the edit request to {{para|answered|no}}, as there seems to be lively discussion going on now, and it's too early to preclude the possibility of consensus arising out of it. Mathglot (talk) 08:56, 14 February 2022 (UTC)

:::{{small|In reply to your housekeeping, I have re-set it; wait for the consensus to appear, then reactivate the TPER. If there is lively discussion then there is not yet consensus. Primefac (talk) 10:08, 14 February 2022 (UTC)}}

So uh, about that "lively discussion": nobody has disagreed with this request other than some initial objections. Testcases have been added and they work. The only discussion was about renaming all parameters, which is not per se related to this edit request. When exactly does consensus for this appear? ―Jochem van Hees (talk) 09:54, 16 February 2022 (UTC)

: The request to add language tagging capabililities has been brought up several times in the past already, and as far as I can see there never was any opposition to it, just that the discussions moved sideways (like they did here as well, me being "guilty" for that ;-). So, I think, there is consensus to add this capability. It just makes sense to have it.

: Speaking of consensus, while any breaking changes need consensus, the template at present is still crude enough in both its implementation and parameter interface that I consider it to be still in its active development phase, not having reached the final form. While it is already actively used, it is also none of the really high-risk templates. So, IMO we do not need to discuss every little non-breaking change down to the smallest bits for as long as the changes are obvious feature or usability enhancements carried out by experienced (template) editors. Moving forward and providing enhanced functionality is beneficial to the project.

: I have reviewed your implementation and found it okay to be rolled out but I have spotted some areas for improvement, therefore I changed the code somewhat and added a few more features:

:* I have changed your |lt-rtl=yes parameter to |dir=rtl, so that the interface logic remains language-agnostic. This makes it easier to port it to other languages. (I proposed the same change for the {{tl|lang}} template, but that one already uses the non-portable |rtl=yes, whereas in our case we are introducing a new parameter, so we should implement it in the most portable fashion right from the start.) There is no risk of confusion for directionality, so the lt- prefix can be dropped from that parameter.

:* Your code did apply italics only when the |italic=yes parameter would be used. To better comply with the MOS, I have changed this so that, if a language is given (and only then), the template will automatically choose the most suitable italics style depending on the actual language and script given, as {{tl|lang}} does. It is still possible to override this using |italic=, which now supports all the arguments supported by {{tl|lang}}: yes, no, unset, invert, default (and their aliases). This is not exactly how our (crude) implemention of |italic= worked before, but since it is very unlikely that someone will have used one of the pre-defined argument values (other than yes and its aliases) to mean something different than to enable italics, it is reasonably safe to implement this somewhat stricter interface - also, the new arguments are only evaluated when a language is given as well, so it would not cause any problems for existing invocations (and if we change the documentation accordingly the previous more lax usage will fade out over time).

:* I have added a number of alias parameters: The somewhat cryptic |lt= parameter now has a |text= alias (another alternative would be |label= or even |label-text=). The parameters |italic= and |quote= now have single letter aliases |i= and |q= because some other templates use these names for this purpose and HTML has similarly named tags as well, so it's intuitive. Although I am not really convinced that we need the lt- disambiguator here, I have kept your |lt-lang= but added |language= and |lang=, which I continue to find more intuitive and easier to remember despite the remote possibility of confusing them with the inter-wiki prefixes. Let's see what gets used by the people. [Later dropped the |lt-lang= alias for the reasons given further below. With the new further enhanced user interface logic, the 'lt-' thing would be even misleading, as the parameter value will internally also be used as prefix if no prefix is given deliberately.]

:* While unnamed parameters are short, their usage order is (logical from the template logic but) IMO not very intuitive in this template. Therefore, I have added named aliases: |link= for |1=, |prefix/pre= for |2=, and |external/ext= for |3=. For cases, where there are multiple inter-wiki targets, the latter two parameters also have enumerated forms. (At a later stage, I think we should combine |prefix= and |external= into one parameter for an even more intuitive parameter interface, as I proposed in another comment above, but this would require some more changes in the internal template logic, so I didn't do it at this stage.)

:* There are quite many cases where the inter-wiki prefix of a foreign wiki would be the same as the language of the locally displayed text, so editors would have to provide both {{para|prefix}} and {{para|language}} with the same value. Therefore, in order to eliminate the redundancy, it is enough to specify {{para|language}}, which's value will also be taken as prefix for as long as {{para|prefix}} isn't specified. So, if the local link's text is in English (or shouldn't be specified), the editor would only specify {{para|prefix}} for the inter-wiki link prefix. If it is the same as the prefix, the editor would only specify {{para|language}}, and if they differ s/he had to specify both.

:* I also changed the spacing between multiple inter-wiki links from a space to a hair-space so that it occupies less room in an article (see other talk). For consistency with citations, if super- or subscripts vertical aligment of {{tl|ill}} is selected, the initial space is suppressed as well, so that they appear in the same style as citations - this does not happen for the default baseline style.

: This has been tested, and I've added some testcases (more could be added). In my opinion this is ready to be rolled out.

:--Matthiaspaul (talk) 10:56, 19 February 2022 (UTC) (updated 15:01, 20 February 2022 (UTC))

::I trust Matthiaspaul's judgement and coding. No objections here. -- Michael Bednarek (talk) 11:24, 19 February 2022 (UTC)

::: Done. --Matthiaspaul (talk) 22:32, 19 February 2022 (UTC)

::::I have reverted this purely because there is zero reason to have four named parameter options if we're creating the parameters. Pick one and stick with it. I wholesale reverted because I did not implement the original change and do not want to impose any unintentional restrictions on the intended functionality.

::::My personal thought is that if you're concerned about the clarity of unnamed parameters, then use the full name ({{para|prefixX}}). Also, I'm not sure {{para|external}} is a good name for the other-language-name (though I do realise I was not involved in the above conversation I also notice no one has commented on that aspect); "external" doesn't immediately make me think "interwiki link", it makes me think more of an external link to another website entirely. If that's just me then that's fine. Primefac (talk) 06:50, 20 February 2022 (UTC)

:::::I agree with Primefac that, without an exceptional reason requiring otherwise, templates should have one parameter for each option and should not add aliases. If someone has to type "quote" instead of "q", so be it. Having alternatives confuses onlookers who want to know what the options mean (is there a difference between "quote" and "q"?) and which option should they use. Aliases waste time. Johnuniq (talk) 08:31, 20 February 2022 (UTC)

:::::: Actually, I think, the opposite is true. Aliases can safe time, because editors can memorize the scheme best suiting their brains instead of having to try out multiple forms before they find the one that works when editing articles.

:::::: Personally, I prefer self-explanatory fully spelled out parameter names, but experience has shown that some people prefer abbreviated parameter names as well and some even one or two letter names. This template so far supports a strange mix of all of this, some parameters are only available in their long form, some only as abbreviations (and some even only as unnamed parameters). That's difficult to remember. That's why I think that in moving forward it is a good idea to harmonize the styles as much as possible by providing a full set of options for each style.

:::::: If I had to choose I would first do away with the one and two letter parameters but that's not easily done because of their legacy use.

:::::: Regarding {{para|prefixX}} I basically agree, but we would still need at least the two forms {{para|prefix}} and {{para|prefixX}}, because in most cases there will be only one inter-wiki link, and having to always enumerate it {{para|prefix1}} just because there could be more of them is odd, but using {{para|prefix}} for the first one and {{para|prefix2}}, {{para|prefix3}}, ... for the others is likewise odd as well.

:::::: Same for {{para|externalX}}. The name was kind of a compromise. IMO, the proper name would be {{para|inter-wiki-link}} or {{para|inter-language-link}}, abbreviatable as {{para|iwl}} or {{para|ill}}, but this is either unnecessarily long or too cryptic (and also not entirely correct as iwls/ills include the prefix - above I proposed to combine prefix and external into one parameter because it would be more natural from a user's perspective, but it would require more coding to split the value into its two pieces internally - I considered this to be a task to be performed in the future). Thinking about alternatives to these long names and scanning the help pages of several other-language Wikipedias for potentially suitable terms and parameter names, I came up with {{para|inter-wiki}}, {{para|inter-link}}, {{para|external-link}} or {{para|foreign-link}}, or shorter {{para|inter}}, {{para|external}} or {{para|foreign}}, also trying to choose parameter names starting on a different letter (so that single-letter abbreviations could be added later, if necessary, |external= could be abbreviated as |e= or |x=, |foreign= as |f=, and |inter= as |i=; the letter 'l' cannot be used as it could mean link, label, or language, and 'i' looks identical to 'l' in many fonts, so it would not be a good one-letter abbreviation as well). That's also why I chosed {{para|text}} over {{para|label}} which are both established parameter names for the displayed label text of piped links in other contexts.

:::::: --Matthiaspaul (talk) 09:33, 20 February 2022 (UTC)

:::::::I don't care whether the template uses aliases or not, but retaining the current scheme of 3 unnamed parameters and {{para|lt}} is crucial because thousands of uses depend on that. We've been through a somewhat traumatic change of this template before, and it would be terrible to lose the current behaviour. If a radical change is desired, a new template should be created for that. -- Michael Bednarek (talk) 11:36, 20 February 2022 (UTC)

:::::::: I mostly agree. Keeping support for the unnamed parameters is essential, and, don't worry, I never considered to abandon them. Keeping support for the cryptic {{para|lt}} name is important as well - we could, however, discourage its use so that editors would start to use a new better parameter in the future - and we could also have a non-priority bot task replacing the old by the new parameter when they would have to edit the article anyway, so that the usage of the old parameter would be slowly faded out over the years. I haven't check the usage statistics of parameters {{para|v}} and {{para|s}} yet - their numbers might be low enough so they could be edited manually.

:::::::: However, keeping the old interface should not hinder us to improve the interface and make it more consistent in itself and with what is used in other templates.

:::::::: {{tl|iwl}} would be free to use for a new template properly designed from the ground up, but going this route would defeat the idea of why we merged the various templates a couple of years back. So, the solution, as I see it, is to tweak and "smooth out" the existing interface as much as possible, that's why I also added aliases like {{para|i}} and {{para|q}} so that it looks more consistent. However, I would be just as happy with fading out {{para|v}} and {{para|s}}.

:::::::: Do you have a good alternative suggestion for {{para|external}}?

:::::::: --Matthiaspaul (talk) 12:38, 20 February 2022 (UTC)

:::::::: To reduce the number of aliases I have meanwhile removed the new {{para|pre(n)}} and {{para|ext(n)}} variants, as well as the {{para|lt-lang}} alias. By the very purpose of this template, we will have to specify at least one prefix (through named or unnamed parameters), and the language of the local label text is optional. However, in many cases the language would be the same as the specified prefix. The interface logic has now been enhanced so that, if the definition of a prefix was omitted, the prefix will be assumed to be the same as the label language, if this is specified, thereby avoiding the redundancy of having to specify the same value twice. Thereby, all combinations are possible to specify with the minimum of parameters. --Matthiaspaul (talk) 15:01, 20 February 2022 (UTC)

=Arbitrary break=

: The name of param {{para|lt}} was once cryptic to me, too, until someone pointed out that it stood for "link text", which makes sense. Other templates unrelated to this one that need a param that serves the same function tend to call it {{para|disp}} or {{para|display}} which is less cryptic, but then so is "link-text". And I'm fine with aliasing any of those to it. One can push for clearer, less cryptic invocations in the future simply by appropriate changes to the doc page naming the clearer name as the param name, and relegating 'lt' to a parenthetical description as an alias. Mathglot (talk) 20:29, 20 February 2022 (UTC)

:: I thought {{para|lt}} would have been derived from "label text" rather than "link text". The documentation for piped links uses [link|label], [link|text] or [L|D]. Unfortunately, our template already uses {{para|display}} as an alias for {{para|preserve}}. Going through existing uses, I also found typos like {{para|text}}, {{para|label}}, {{para|name}}, {{para|Lt}}, {{para|tl}}, {{para|t}}, {{para|lit}} and {{para|l}} being used in {{tl|ill}} templates in the wild instead of the correct {{para|lt}} one, that's why I added {{para|text}}.

:: --Matthiaspaul (talk) 22:29, 20 February 2022 (UTC)

::: I actually call that field a 'source anchor' (or just 'anchor' for short) and not any of those terms because that's what W3C does, but WP has a somewhat different conception of 'anchor', so we can't use that. If you do "fade out" any existing params, I assume you mean removing them from the doc page but not the template itself, unless you are planning a bot to adjust existing transclusions. Mathglot (talk) 22:55, 20 February 2022 (UTC)

::::Incidentally, your point about bots is exactly the reason why I am generally opposed to having more than one named parameter for any given function - not only are there more options for people to screw up the parameter anyway, if ever we get to the point where a parameter needs changing or other alteration, we have to code in that many exceptions for the various potential alternate names that we've created. I'll try to remember where it was, but a year or so back we had a really productive discussion (somewhere) about the pros and (mostly) cons of multiple parameter names. Primefac (talk) 08:20, 21 February 2022 (UTC)

::::: I see your point, but on the other hand, adding aliases to a list of supported parameters in a bot is really trivial (it just needs to be done, so, if there would be dozens of bots involved, it still creates unnecessary maintenance overhead - ideally the interface would be mostly static in order to avoid frequent changes).

::::: If the alternative names "catch" at least the most frequent unsupported parameter names people enter anyway (because for some reason it's in their mind model about the template), it can also help to save their time and improve the usability ("do what I mean"). I can see pros and cons for both, having alternative parameters and not having them. I think, an "ideal" parameter name would be self-explanatory, easy to remember and matching what users would come up with by themselves, not being too specific but also not too unspecific, and as short as reasonably possible. Often enough, this cannot all be had in a single parameter name. Some people are very good at memorizing abbreviations (mnemonics), some are very bad at this, so to serve them both, it's good to offer alternatives for both of them for as long as they nicely integrate into the interface as a whole.

:::: --Matthiaspaul (talk) 13:00, 21 February 2022 (UTC)

::::Whatever you do, please don't remove or change existing parameter names, as that breaks old revisions. Removal of parameters or aliases is harmful. Not adding them unless really needed helps avoid this harm. —Kusma (talk) 08:33, 21 February 2022 (UTC)

::::: Don't worry, by "fading out" I didn't mean to remove them, just deemphazing those which don't fit well into the interface as a whole. Since we are developing an existing template rather designing one from scratch, we have to live with its legacy. But at the same time it shouldn't keep us from improving the template, and if there would a small hill to climb to reach the green meadows, it might be worth it. There could be low-priority "clean up" tasks, so that when an article gets edited anyway deprecated parameters could be replaced by the better ones. But I'm not into the bot business, so that would probably be a slow process over the years, nothing abrupt.

::::: --Matthiaspaul (talk) 13:00, 21 February 2022 (UTC)

::::::Just as a point of interest, I will always support unnamed parameters over named parameters if there is a clear and obvious use-case for them. This template is a perfect example of that: {{tlc|ill|link|lang}} is fast and easy to type out, and I shouldn't need to remember parameter names. Again, I have zero issue if the consensus here is that we need to have named parameters (though I personally think they are unnecessary), but I will oppose any attempt to deprecate the unnamed params. Primefac (talk) 13:14, 21 February 2022 (UTC)

::::::: I mostly agree with you. They can be nicely short and are often even intuitive if there is some underlying "natural" order of parameters so that you would add more parameters only when you'd have to deviate from the "natural" defaults otherwise assumed. Your example {{tlc|ill|link|prefix}} is still nicely short, but it also starts to shows the dilemma: From the way how interwiki-links look like, some people would find {{tlc|ill|prefix|link}} more natural (as per past discussions), and it becomes somewhat arbitrary when a 3rd argument is being added. Is it to override the local label text (as in a piped link), or to override the foreign article title, or even for the next prefix in the row? Different people will assume different things here (as past discussions have shown), so this is where it stops being intuitive and where named parameters are easier to use. And, as Mathglot has pointed out in another thread, in the case of this template, in extreme cases we could have rows of 25 unnamed parameters - that's nightmarish to maintain ("Why doesn't it work? Did I miss a pipe somewhere? And which parameter is for what?"). So, yes, unnamed parameters are great sometimes, but named parameters are great as well. I guess, that's why we have them both (and should continue to support them both).

::::::: And for {{tq|fast and easy to type out}}, that's why some people like to have one-letter parameter names, whereas others do not find them intuitive. I take that as different editors having different needs/preferences and think that's perfectly okay.

::::::: --Matthiaspaul (talk) 14:59, 21 February 2022 (UTC)

:::::::: To me, a big part of template usage is how intuitive the documentation is, and it just looks pretty unintuitive now and I'm worried we'll scare away new users. And to me, prefix is part of that, when it's a language code in almost all cases. Mathglot (talk) 08:56, 22 February 2022 (UTC)

:::::::::The documentation is a mess, and it's been a mess since before we even merged everything together. For a template that is as (relatively) straight-forward as this template is, the documentation is hella convoluted. I think the primary issue is that we try to explain in prose what we should just do in examples (which is what almost every other template does that I watch/edit). Primefac (talk) 09:08, 22 February 2022 (UTC)

::::::::::I've created a sandbox for the /doc so that I can make major changes without disruption and to get more feedback. I'll start a new thread for feedback discussion. Primefac (talk) 19:54, 22 February 2022 (UTC)

::::::::: I think that the term {{para|prefix}} is quite accurate to describe the colon-separated prefix (or prefixes, as there can be several of them, i.e. wikt:de) in front of a wikilink. (Prefixes are also used for [https://meta.wikimedia.org/wiki/Interwiki_map pseudo-protocols].) It is important to distinguish these link prefixes from codes to specify the language of the label text, because they are different concepts following different rules.

::::::::: In contrast to prefixes, actual language codes can have additional specifiers to distinguish between language variants (i.e. "he-LA" describes Latin jargon in Hebrew) or scripts ("ru-Latn" specifies Russian written in Latin script), etc.

::::::::: It is true that many prefixes specifying foreign-language entities of Wikipedia were assigned based on existing language codes at that time so that, in simple cases, many of the codes are identical (for example, the German Wikipedia uses a prefix "de", and "de" is also the (default) language code for German). But not all foreign Wikipedias use a prefix identical to the language code of the corresponding language (as an example, the Alemannic variant of Swiss-German Wikipedia uses a prefix "als", which is the official language code for an Albanian dialect (quite a difference!), whereas the actual language code for Alemannic is "gsw").

::::::::: What might confuse readers is that, in the current template documentation, we incorrectly use the term "language code" also for the prefix codes. Instead we should start to properly distinguish between them.

::::::::: --Matthiaspaul (talk) 22:32, 22 February 2022 (UTC)

:::::::::: The term prefix is a terrible choice, even if it is accurate in some sense. I don't agree with the last statement about "language code" vs. "prefix code". This is true only very narrowly: yes, there are non-language prefix codes such as wmf:, m:, wikt:, mw:; even phab:, wikia:, meatball:, and others. How many people come here for that? Not one in a thousand, or ten thousand. This template is the Interlanguage link template, and nobody comes here to link to any of those non-language prefix destinations, they come here to link to natural languages like French, Spanish, or Russian. Even though the geekiest of Wikinerds and template writers (like us) know that we can actually use it as a non-language prefix and perhaps take great delight in linking to meatball wiki. The addition of the named parameters {{para|prefix}} is not an improvement for anybody who has used this template in the past, and it will only confuse new and occasional users who come here in the future, to a template called "interlanguage link", to find no language parameters at all but a whole pile of strangely-named parameters of uncertain purpose.

:::::::::: We could always create a new FAQ:

::::::::::* Q1: "Where are the language codes?"

::::::::::* A1: "They are actually called prefix-."

::::::::::* Q2: "Oh? Why aren't they called lang or something?"

::::::::::* A2: "Well, you see, you might be wanting to go to mediawiki, or meatball, or wikia or phabricator."

::::::::::* Q3: "Um, what?"

:::::::::: Finally, your claim about the language codes used not being "actual language code" is a red herring. Your assertion about the "als" code being incorrect, or not "the actual code" isn't true at all, unless by "actual" you mean the [https://www.loc.gov/standards/iso639-2/php/code_list.php ISO-639-2 code]—which we do not use—as opposed to the code that wikimedia uses across all platforms, which for Allemanic is, in fact, als. This is completely self-consistent, and whether our lang-code set is identical to ISO-639, differs slightly, or is wholly different from ISO-639 is entirely immaterial and irrelevant for anything concerning this discussion.

:::::::::: There is no advantage to any real-word editor in using the word prefix in a parameter name at this template, unless our goal is to confuse existing users, and drive away new ones. I see a couple of approaches: undo all of the recent changes to add {{para|prefix}} parameter aliases to the positional parameters (not my choice, and not needed), or, since adding named parameters seem to be consensus and I'm fine with that, add a reasonably named parameter, like {{para|lang}}, or {{para|lang-code}}, or {{para|code}}, or {{para|xx}}, as another alias, on top of the prefix aliases. Since I don't wish to undo what has been done so far (and I happen to be in the aliases-are-good camp), I plan to add one of those aliases, or some other alias if someone knows a better one. But the current situation is completely untenable. In order not to whipsaw users who might notice changes to the doc and begin to use new parameters, only to see them disappear again in days, weeks, or months, I've removed all mentions of "prefix" from the doc page for now, until this is settled. Mathglot (talk) 05:34, 28 February 2022 (UTC)

::::::::::: I'm afraid, I disagree, and some of your statements are demonstratable untrue - basically all our templates dealing with languages will interpret language codes as I specified above (and you claimed to be incorrect, which it isn't) - see for yourself:

:::::::::::*{{lang|als|Language als}} → {{lang|als|Language als}} (tooltip indicates this as Albanian)

:::::::::::*{{lang|gsw|Language gsw}} → {{lang|gsw|Language gsw}} (tooltip indicates this as Alemannian)

:::::::::::*{{citation |title=Language als|language=als}} → {{citation |title=Language als|language=als}}

:::::::::::*{{citation |title=Language gsw|language=gsw}} → {{citation |title=Language gsw|language=gsw}}

:::::::::::*{{rp|page=3|quote=Language als|language=als}} → {{rp|page=3|quote=Language als|language=als}} (tooltip indicates this as Albanian)

:::::::::::*{{rp|page=3|quote=Language gsw|language=gsw}} → {{rp|page=3|quote=Language gsw|language=gsw}} (tooltip indicates this as Alemannian)

::::::::::: These codes are not, in general, the same codes as those used (only) by Mediawiki for their interwiki prefixes (although, in some cases, they match): The Mediawiki prefix of the Albanian Wikipedia is "sq" (not "als"), and for the Alemannian Wikipedia it is "als" (not "gsw").

::::::::::: As your argumentation shows it will only confuse users to lump them together as if they were the same, in particular as in the case of {{tl|ill}} we have to distinguish between both of them in a single template: The language of the label text (as specified by {{para|language}} or {{para|lang}}) and the prefixes of the various foreign-language Wikipedias (by {{para|prefix}}/{{para|prefixN}} or unnamed parameters).

::::::::::: {{para|language}}/{{para|lang}} accepts ISO language codes, IETF language tags and language names, whereas {{para|prefix}}/{{para|prefixN}} accepts only interwiki prefixes, which are arbitrary assignments of codes which just happen to follow ISO language codes in many cases but also deviate from them in many cases for various reasons. {{para|language}}/{{para|lang}} has proper range-checking so that no invalid codes will be accepted, and language names (like "German") will be converted into the proper language codes internally - as demonstrated above, this works exactly like with CS1/CS2, rp, r, lang and many other templates which take a {{para|language}}/{{para|lang}} parameter to specify a language of some kind of text. It is important, that we pass down those standardized language codes (and not some Mediawiki prefixes in disguise) because they are also used for the HTML lang= attribute, and web browsers only accept the officially defined codes. (If we would pass down the prefix codes instead, screen readers would incorrectly switch to "Albanian" pronunciation when refering to the Swiss-German Wikipedia).

::::::::::: Unfortunately, we cannot do this for prefixes for the very reason that they do not follow language codes exactly. Therefore, we should not use a parameter name for them which would suggest that they are identical to actual language codes. As they take different arguments, they should also have distinguishably different names.

::::::::::: To still make it as easy as possible for users to use actual language codes, the template implements a special case so that if a {{para|prefix}} is not defined (it normally should), a given {{para|language}}/{{para|lang}} will be used as a fallback. This works on the assumption that {{para|language}}/{{para|lang}} is conceptually optional whereas {{para|prefix}} is not, so that it is in the responsibility of the user to ensure that a {{para|prefix}} is specified in all cases where the evaluation of {{para|language}}/{{para|lang}} would result in (a correct language code, but) not the prefix of the corresponding foreign Wikipedia. So, for as long as only one foreign Wikipedia is linked to, and the label text is for a term in that foreign language, and the prefix of the foreign Wikipedia happens to be the same as that language code, it is possible to use {{para|language}}/{{para|lang}} instead of {{para|prefix}}/{{para|prefix1}}. This gives what you are looking for, but it only works in this specific case because in the general case it is not possible to derive prefix codes from language codes or vice versa.

::::::::::: If we would introduce {{para|languageN}}/{{para|langN}} (not {{para|language}}/{{para|lang}}) as aliases to {{para|prefixN}}, users would wonder why {{para|language}}/{{para|lang}} would take language codes, tags and names, whereas {{para|languageN}}/{{para|langN}} would take only prefixes, therefore I don't think this would be a good idea at all.

::::::::::: --Matthiaspaul (talk) 08:00, 28 February 2022 (UTC)

:::::::::::: Then either let's revisit the decision to add named parameters at all, or else hold an Rfc about what the names should be. The old system with no named params was working fine; this just makes it worse. I am opposed to it because I am convinced it would dissuade users, especially new ones, from ever setting foot here, thus not an improvement to the template, and since a core value of the encyclopedia is that every edit must in some way improve things and this does not, it should not remain. To be clear, my objection is to the documentation mentioning it, I don't really care if you keep the new parameter names in the template, as long as it is not documented. Mathglot (talk) 08:27, 28 February 2022 (UTC)

::::::::::::: I'm unconvinced and don't think users will have any problems to understand that they can use {{para|prefix}}/{{para|prefixN}} at all, because they are prefixes and are so called also in other documentation (searching for other terms I also found "interwiki prefix", "WP code", "wiki code", "language prefix", "language code prefix", "subdomain" and "subdomain prefix" being used for them). (If users would actually have problems with {{para|prefix}}/{{para|prefixN}}, they can also use the unnamed parameters - so this is in no way a step back as you put it trying to make a point.)

::::::::::::: We cannot use {{para|language}}/{{para|lang}} (without an enumerator) for a prefix, because this parameter name is used for the language code of the text label and is basically the first choice of name for a parameter taking HTML-compatible language codes, as is established in millions of citations. IMO, it would considerably confuse (rather than help to clarify it for) users if this parameter name would be used for something different than HTML-compatible language codes in this template, and even more so, if the actual codes are similar enough to "somehow" work in some cases, but not in others (to users this looks as if the implementation would be unreliable or bugish, which it isn't).

::::::::::::: Therefore, whatever parameter name we choose for interwiki prefixes, it should be considerably different from {{para|language}}/{{para|lang}} so that users don't mix them up in their mind model. In theory, the enumerated forms {{para|languageN}}/{{para|langN}} would be free to use, but it would confuse users if {{para|language1}}/{{para|lang1}} would not take the same types of codes and work identical to the unenumerated {{para|language}}/{{para|lang}}, and it would likewise confuse them, if we would tell them that they will always have to specify an enumerator (1) with the parameter even if they want to deal with a single foreign Wikipedia link only (the most common case). It may not be perfect, but among the potential parameter names found and suggested I find {{para|prefix}}/{{para|prefixN}} to be by far the best one, it is spot-on, semantically correct, specific enough (but not too specific so the name works for all kinds of prefixes instead of only for language prefixes) and (in the context of this template) difficult to confuse with something else, easy to grasp and short enough to remember easily.

::::::::::::: However, if it would help to settle the case I could agree to add aliases to {{para|prefix}}/{{para|prefixN}} named {{para|code}}/{{para|codeN}} as you suggested. {{para|subdomain}}/{{para|subdomainN}} would be another option, but is even more technical than prefix and already too specific (because a prefix can be more than only a subdomain). I find the {{para|code}}/{{para|codeN}} parameter name meaningless and highly ambiguous, but at least it is part of "WP code". The documentation should then document both and list {{para|code}}/{{para|codeN}} as an alias of {{para|prefix}}/{{para|prefixN}}, not the other way around.

::::::::::::: In general, I think, your (IMO only) anticipated "user confusion" can be more easily addressed by explaining the different types of codes in the documentation, something I already started to work on, but can't continue until the topic is settled and the already much improved documentation restored.

::::::::::::: --Matthiaspaul (talk) 21:47, 28 February 2022 (UTC)

:::::::::::::: I think that wall of text is confusing even for template writers, and looks like something that should be part of a template writer hack-a-thon. As for real-world new users, who are struggling to get on board with WP:Verifiability, and the five- and ten-year editors who still can't quite get the point of WP:DUE and WP:CHERRYPICKING, they will never get a clue with any of this. Unless you can get a clear consensus of users (non-template writers) here that support your argument, I'm afraid we are headed for an Rfc. There's no way this is going to make sense to anybody that isn't a member of our little club. If you want to continue with the doc, go ahead, but I'd prefer it if you did it in the sandbox, because I don't see the current form of the template lasting for any significant amount of time, and I don't want to whipsaw the users with ephemeral documentation. Mathglot (talk) 08:13, 1 March 2022 (UTC)

:::::::::::::::I think you have just removed the pointless aliases. Thanks! This template is a kludge understood by a handful of editors. It needs to be comprehensible for others who need to understand wikitext and do not need to be baffled by wacky variations in parameter spelling. Johnuniq (talk) 23:35, 1 March 2022 (UTC)

= Back to lang tag =

Just in case it got lost in the reams of discussion about other things, this section began 12 February, and is entitled Support lang tag, and is about using "{{xt|a new {{para|lt-lang}} parameter (and an accompanying {{para|lt-rtl}} corresponding to {{tl|lang}}'s right-to-left parameter)}}". It's not clear to me whether there is consensus for this, although maybe there is. In any case, it seems like a good idea and should probably go ahead.

An important sidebar to this, is the fact that there is definitely not consensus for anything else in the discussion above, in particular for any other parameter other than the two originally proposed. The very first template edit following the initial 12 Feb proposal was made, is rev. 1072875044 of 22:27, 19 February 2022 which added {{para|lt-lang}} as well as two dozen other new parameters to the template. As there is no consensus for this, it is subject to being removed, until it does achieve consensus.

In my opinion, we should start by deciding yes-or-no whether the OP's initial proposal of lt-lang/lt-rtl has consensus or not; and if so, implement it, and adjust the documentation accordingly based on rev. 1058306609 of the /doc page of 18:53, 2 December 2021, which is the last revision of the /doc prior to the lt-lang proposal at the top of this section. Once that is decided one way or another, we can then move on to the question of adding other parameters, which really should start in a new section. Mathglot (talk) 23:08, 1 March 2022 (UTC)

= Survey: implement lt-lang/lt-rtl =

  • Support{{snd}}I'm fine with the OP's proposal of these two new params. I have some concerns about not overburdening the /doc page with detail that will make it harder for naive users to find the core functionality of the template, but if handled properly (likely further down, and with a link to {{tl|lang}}) then I'm fine with it. Mathglot (talk) 23:09, 1 March 2022 (UTC)

:: Yes. You can't "overburden" documentation with detail; or rather - that point of view risks coming across as elitist ("let's not tell the population what they can't handle"). What you can do, is (to avoid) writing poor documentation that doesn't properly differentiate between the forest on one hand, and the trees on the other. My point is: if "naive users" can't find "core functionality" the problem is seldom the inclusion of interesting detail, only shoddy presentation. CapnZapp (talk) 10:17, 2 May 2022 (UTC)

  • Support both changes, especially the addition of {{para|text}}: I happened to use this template for the first time in a while before the recent changes were reverted, I found {{para|text}} worked a lot more intuitively than {{para|lt}}. Flatly replacing {{para|text}} with {{para|lt}} resulted in this abomination: {{ill|Codifier of administrative-territorial units and territories of hromadas||lt=KATOTTH|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}} instead of the intended {{ill|lt=KATOTTH|Codifier of administrative-territorial units and territories of hromadas|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}}. Hecseur (talk) 13:52, 2 March 2022 (UTC)
  • :{{u|Hecseur}}, your first code is broken, it should be {{ill|Codifier of administrative-territorial units and territories of hromadas|lt=KATOTTH|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}}
  • ::{{tlc|ill|Codifier of administrative-territorial units and territories of hromadas||lt{{=}}KATOTTH|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}} (yours) vs
  • ::{{tlc|ill|Codifier of administrative-territorial units and territories of hromadas|lt{{=}}KATOTTH|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}} (mine)
  • :In other words, you have a blank parameter and it's breaking things. Primefac (talk) 16:02, 2 March 2022 (UTC)
  • :::Oh, I completely missed it. Regardless, the label "text" is a lot more intuitive to me than an unfamiliar accronym like "lt". Hecseur (talk) 03:01, 3 March 2022 (UTC)
  • Support. Although I was the one who originally proposed it I didn't really participate in the discussion because of other things that got in the way, sorry. But it seems there is some agreement now at least for this addition. ―Jochem van Hees (talk) 10:38, 25 April 2022 (UTC)

= Edit request =

{{Edit template-protected|answered=yes}}

There seems to be consensus for the addition of the {{para|lt-lang}} and {{para|lt-rlt}} parameters, with as far as I can tell no one having a problem with it (most of the discussion above was about something else). An implementation has been ready and tested for months on {{Oldid|Template:Interlanguage link/sandbox|1071320106|this sandbox revision}}. ―Jochem van Hees (talk) 21:38, 1 May 2022 (UTC)

: In the spirit of how the edit template states "This template must be followed by a complete and specific description of the request", can I ask you to summarize what these parameters are meant to do (what problems are the edit supposed to fix?) so "an editor unfamiliar with the subject matter" does not have to hunt for those details above? (Please don't take the programmer's view that code is self-documenting :) Cheers CapnZapp (talk) 10:19, 2 May 2022 (UTC)

::Oh, yeah. So, for accessibility reasons, foreign-language text should be put in a {{t|lang}} tag per MOS:LANG (see its documentation about what it is used for). However, {{tlg|ill|nolink=y}} currently doesn't really work well with that template, which is a problem if you have foreign-language text in an interlanguage link (e.g. on the page Austria-Hungary there is {{ill|Landesausschuss (Austria)|de|Landesausschuss (Österreich)|lt=Landesausschuss|lt-lang=de|italic=yes}}, which is a German word so it should have a lang tag). To make this possible I proposed two parameters, {{para|lt-lang}} and {{para|lt-rtl}}, which correspond to {{tlg|lang|nolink=y}}'s {{para|1}} and {{para|rtl}} parameters. Specifying them puts a {{tlg|lang|nolink=y}} tag around the link text for you. So in the example above you'd add {{para|lt-lang|de}} to indicate that the link text is in German. ―Jochem van Hees (talk) 20:22, 2 May 2022 (UTC)

::: Hmm. This makes it considerably more involved to post a proper ill link. Not sure I like it. (I'm not against the voluntary usage, and I certainly do not oppose making it possible to make life easier for disabled people. However, I feel the next suggestion is only a step behind, that is, to make it mandatory - since, after all, all links to foreign-language Wikipedias contain foreign language (duh!). {{pb}} Thus I suggest we encase the foreign-language link in lang tags per default (no need to specify BOTH {{para||de}} and {{para|lt-lang|de}}), so in many cases no "lt-lang" malarkey is needed. Note: you are still free to implement them as far as I am concerned; if they are supplied they should of course override the default. But in your example case, the worst that could happen (=if the user forgets or can't be bothered to supply lt-lang parameters) is that the entire "Landesausschuss (Österreich)" is encased within lang tags instead of what you desire, just ""Landesausschuss". Making this the default would go a long way in deflecting future complications from adding what you propose to add. Thanks! CapnZapp (talk) 06:19, 3 May 2022 (UTC)

::::The default is that the link text is written in English. If several interwiki links are given, there is no way to guess the language. —Kusma (talk) 06:37, 3 May 2022 (UTC)

::::Hm that's a good point. However, there are currently also a lot of interlanguage links that have English-language link text; for example on Eurovision Song Contest 2021 there is the link {{ill|Rotterdam City Hall|nl|Stadhuis van Rotterdam}}. And there's also a lot of links that are people's names which I think don't have to be tagged with {{tlg|lang|nolink=y}}. So making it on by default would mean we'd still need to do a lot of edits to turn it off on all those pages. ―Jochem van Hees (talk) 11:41, 3 May 2022 (UTC)

:::::I would strongly oppose any changes to the default behaviour. I think your suggestion of optional parameters to incorporate {{tl|lang}} if and only if necessary is much better. —Kusma (talk) 11:48, 3 May 2022 (UTC)

:::::: I was led to believe we were discussing the article title of the foreign-language wikipedia page, but whatever. Looking at Austria-Hungary I far prefer the solution district (Bezirk) where any usage of lang tags would be restricted to an "inert" term (a black not-a-link): if the article didn't already exist you'd have {{ill|District (Austria)|de|Liste der Bezirke und Statutarstädte in Österreich|preserve=yes}}. I now understand it isn't the foreign-language link you want lang'd. It is the English-language link (normally red), except here the article title is translated into English so no lang is needed. CapnZapp (talk) 14:36, 3 May 2022 (UTC)

:{{Already done}}. The sandbox version linked above {{Oldid|Template:Interlanguage link/sandbox|1051504880|made by editor Mathglot}} has already been implemented. That sandbox version was copy/pasted to the live version and previewed (actually clicked on "Show changes") and there was "no difference". There may still be a need for more discussion if any other edits are wanted. P.I. Ellsworth - ed. put'r there 14:41, 22 May 2022 (UTC)

::{{Reply to|Paine Ellsworth}} whoops, it seems I linked the wrong revision, sorry. I updated the link. ―Jochem van Hees (talk) 23:05, 22 May 2022 (UTC)

:::Okay, "already done" has been struck. All test cases are green; can more be added to show diffs between the sandbox and live template? (I've placed that version in the present sandbox.) Also, will this be a significant enough edit to inform the bot operators? P.I. Ellsworth - ed. put'r there 23:36, 22 May 2022 (UTC)

article name conflicts on local Wiki

Arguably, this overlaps with #Option to remove enwiki link, but I'll both indicate the needed enhancement as well as suggest the "best available alternative" given the existing template.

The limitation of the existing template is that there's no provision to have a displayed name for the link, separate from the putative name of the article on enwiki. Of course, given that it's a putative name, the first thought would be to just specify displayed name in the first field. This works as long as there isn't a pre-existing article on enwiki with that name.

The workaround for this is to use a standard inter-wiki link, but then the link which is normally red will appear in blue, and the language code needs to be explicitly added. This has the limitation of working for a single language for the interwiki link. This also will not be subject to the feature of being automatically removed when the article becomes available on enwiki. Fabrickator (talk) 19:41, 30 September 2022 (UTC)

:As usual, an example would be helpful. The template {{em|does}} have a parameter for "displayed name", {{para|lt}}, so it's not clear to me what the problem might be. -- Michael Bednarek (talk) 02:01, 1 October 2022 (UTC)

:: I understand why some template editors feel that aliases are not ideal (see previous discussions) but I believe we should place the needs of template users ahead of those of template editors, and this is an example of why. Imho, if we aliased {{para|disp}} or {{para|display}} to {{para|lt}}, we would not be having this conversation, and I'd support adding such an alias. Mathglot (talk) 10:21, 1 October 2022 (UTC)

::: First off, thanks to User:Michael Bednarek for pointing out {{para|lt}}. I had actually tried to use that at some point, but (trying to reconstruct what may have happened that caused me to avoid it) I apparently ran into some difficulty with it, and perhaps had some uncertainty as to what this was really supposed to be used for. One thing I note is that in the example, the article name includes a parenthesized description, and given that the use case is specifically that the article doesn't exist on the local Wiki, it kinda sorta doesn't make sense. Then trying it anyway, without being confident about what the intended use case was, I might have run into the problem that by omitting the article name for the target wiki, it might have seemed non-obvious what this would default to, so I just decided to use the workaround of a standard interwiki link.

::: So thanks to your reply, I had greater confidence that this was in fact appropriate to my use case, and went back and fixed things up for each of the relevant links that I added on Academy Award for Best Documentary Feature Film. Fabrickator (talk) 04:22, 2 October 2022 (UTC)

Order of parameters

I find it hard to use this template when the orders of parameters here and in :c:Template:Interlanguage link differ. Perhaps something should be done about this - to make it easier for users. I hope a central repository will soon be available for template messages.[https://phabricator.wikimedia.org/T121470] --TadejM my talk 06:30, 8 January 2023 (UTC)

:Given that this template is actively maintained (and used more than [https://templatecount.toolforge.org/?lang=commons&name=Interlanguage+link&namespace=10#bottom 261 times]) the onus is probably on Commons to update their template to match, should it be that large of an inconvenience (which, given the aforementioned lack of use, is probably not the case anyway). We have had multiple discussions here about the parameter order, and so I highly doubt we'll be changing it here again (never mind then having to update [https://templatecount.toolforge.org/index.php?lang=en&namespace=10&name=Interlanguage_link#bottom 143k+ uses]). Primefac (talk) 07:06, 8 January 2023 (UTC)

Ok, thanks for the clarification. In view of the numbers and the existing discussions, I agree that this would be easier to fix in Commons. On the other hand, perhaps there will be objections too, so the best chance may be to wait for a central repository. However, it should be done. --TadejM my talk 07:25, 8 January 2023 (UTC)

There is an already existing proposal on Commons and I've added my support for it.[https://commons.wikimedia.org/wiki/Template_talk:Interlanguage_link] I'm going to fix this on Commons if there is no objection. --TadejM my talk 07:33, 8 January 2023 (UTC)

On the other hand, I wonder why there is inconsistency in the order of parameters between {{tl|Interlanguage link}} and {{tl|Translated page}}. In the first case, the language code comes first, while in the second case, it comes second. The template on Commons is better in this regard. 🤔 --TadejM my talk 08:39, 10 January 2023 (UTC)

: I have no trouble seeing how inconsistencies might crop up in any sufficiently large organization, but that's maybe just me. CapnZapp (talk) 13:37, 10 January 2023 (UTC)

::I agree, but we should strive to remove such inconsistencies when noticed to make the work as easy as possible. --TadejM my talk 10:01, 13 January 2023 (UTC)

::: I did not comment on whether these circumstances merit being called "inconsistencies" or whether they need to be "fixed". I was commenting on you wondering why the "inconsistency" exists - I find that to be completely natural in circumstances where significant number of people make unrelated improvements and in no way necessarily implying wrongdoing or negligence on anybody's part. CapnZapp (talk) 18:22, 13 January 2023 (UTC)

:The order is the same, just {{tl|ill}} has an additional parameter in front, the page title on the English Wikipedia. This is followed by language code and page title on a foreign Wikipedia. It only looks inconsistent in cases where the titles are identical (common for biographies), because the foreign language title defaults to the English language one and so the template can be used with what looks like reverse ordering. —Kusma (talk) 10:14, 13 January 2023 (UTC)

::Well, yes. It would be more tidy and simple if these templates looked more consistent. It is much easier to remember the rule that the language code always comes at the beginning than a number of exceptions where this is not the case. I have found some other similar templates using a 'language code' parameter (e.g. {{tl|lang}}, {{tl|wikt-lang}}, {{tl|verse translation}}, {{tl|expand language}}, etc.}}; I may create a category. They all seem to place the language code parameter at the beginning. --TadejM my talk 12:58, 13 January 2023 (UTC)

::: TadejM, there may be an issue here of how you are viewing what goes on with this template wrt the order of the elements. I would argue that the language code parameter *is already* at the beginning, just as in those other templates you mentioned, and just as the language code is at the beginning in a sister link to a foreign wikipedia, such as in :fr:Tour Eiffel:fr:Tour Eiffel.

::: Kusma pretty much already said this, but here is another way to look at what (I think) {{they were|Kusma}} saying. Here is what I mean: how would you code an {{tl|ill}} link for the French article :fr:Tour Voltaire, which does not yet exist in English? I think it would be like this:

:::: {{ill|Voltaire Tower|fr|Tour Voltaire}} ⟶ {{ill|Voltaire Tower|fr|Tour Voltaire }}

::::                      ^^ ^^^^^^^^^^^^^

::::                   :fr:Tour Voltaire

::: So the way I see it, it *is* in the same order. What's different, is when the French and English titles are identical, then the template allows you to save typing by dropping duplicate names. If we write the canonical {{tl|ill}} template for the Poet "Touria Ikbal", then it would look like this:

:::: {{ill|Touria Ikbal|fr|Touria Ikbal}} ⟶ {{ill|Touria Ikbal|fr|Touria Ikbal}}

::: But, if you write it using the "shorthand method", then it looks like this:

:::: {{ill|Touria Ikbal|fr}} ⟶ {{ill|Touria Ikbal|fr}}

::: Notice that the generated link on the right is the same both ways, the template recognizes them as identical. So, even in the second case, the language prefix is still "first", it's just that it's "first" in front of an object removed because it's a duplicate. Maybe you can think of this in the same way that English allows us to eliminate duplicate pronouns:

:::: {{talk quote|"He went upstairs and he went to bed" ⟶ "He went upstairs and went to bed".}}

::: That sentence consists of two independent clauses joined by and, but in the second one, "Went to bed" cannot be a standalone sentence all by itself, but in a compound sentence joined by the conjunction and, the rule (linguistic transformation, if you prefer) says that you can drop the subject pronoun in the second (and subsequent) independent clauses if it is (they are) the same as the subject pronoun in the first clause ("He went upstairs"). So what we have in English, is a shortening rule when two things are the same. Do you see where I'm going with this?

::: If you can rejigger the way you look at {{tl|ill}} parameters, and think about it as "the language prefix always comes first", and that there's a transformation rule that drops the language prefix when it's the same as the one in the "first clause", then maybe you won't have a problem any more remembering "which one comes first". One more example, to cement this new way of looking at it: consider Italian violinist Luigi Madonis, who has an article in several other language Wikipedias, but not English. The canonical form (without "duplicate-drop transformation") would be:

:::: {{ill|Luigi Madonis|ca|Luigi Madonis|de|Luigi Madonis|ru|Мадонис, Луиджи}} ⟶ {{ill|Luigi Madonis|ca|Luigi Madonis|de|Luigi Madonis|ru|Мадонис, Луиджи}}

::: and the "shorthand" version with the transformation that drops duplicates looks like this:

:::: {{ill|Luigi Madonis|ca||de||ru|Мадонис, Луиджи}} ⟶ {{ill|Luigi Madonis|ca||de||ru|Мадонис, Луиджи}}

::: Note that the two results, with or without duplicate-dropping, are identical; in coding the parameters, only the Russian one must be kept, because it's not a duplicate of Luigi Madonis, but all the other ones are dropped. Even so, you can still see the trace of where they used to be, due to the double vertical bar characters highlighting the dropped params.

::: Finally, Commons is international, with no particular language having priority (at least in theory) so if it's English, then the "en" code has to go first. But this is English Wikipedia, so you can drop the "en", since English always goes first here, so why bother including it? The redlinked article to be created *always* has an implied "en" prefix, which is not necessary to include, so you can consider it "there, but dropped" if it helps you to think about it that way. So if you want, you can think of "every" {{tl|ill}} on English Wikipedia as starting with

:::: {{ill|en|ArticleName|fr|FrenchTitle|it|ItalianTitle...}}

::: with the |en dropped because this is English Wikipedia. I hope this explanation helps you view the {{tl|ill}} template on English Wikipedia as not really having a different order than in other templates on sister projects, there are just some shorthand rules that apply here, and are taken advantage of to save typing. Mathglot (talk) 09:35, 14 January 2023 (UTC)

::Hello, Mathglot. Thank you for the detailed explanation. Yes, this makes sense and it helps thinking about it this way. On the other hand, it takes quite some mental gimnastics and is not the most intuitive to think a parameter is there when it is actually not. It reminds me of learning a new language. --TadejM my talk 11:44, 14 January 2023 (UTC)

::: Lol; I like your analogy, TadejM. In a way, using templates can be like learning a new language (some templates more than others). And then there's writing templates, which is *definitely* like learning a new language, but I digress... Mathglot (talk) 11:52, 14 January 2023 (UTC)

"[[:Template:Nt]]" listed at [[Wikipedia:Redirects for discussion|Redirects for discussion]]

30px

The redirect [//en.wikipedia.org/w/index.php?title=Template:Nt&redirect=no Template:Nt] has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at {{slink|Wikipedia:Redirects for discussion/Log/2023 June 1#Template:Nt}} until a consensus is reached. Primefac (talk) 06:44, 1 June 2023 (UTC)

Let's fix this common param-mixup trap

Here's a case of broken template results due to misuse of parameters which is very easy to fall into, which would be conceptually easy to fix, and I think we should fix it.

In a previous section, a user illustrated {{their|TadejM}} "support" vote with an example, which promptly broke, as pointed out by another user, because of a misplaced parameter. Here's an excerpt from that discussion:

{{cot|indent=0.8em|bg=cornsilk|see excerpt       (Note: poor overflow wrapping may extend horizontal window width.)}}

  • Support both changes, especially the addition of {{para|text}}: I happened to use this template for the first time in a while before the recent changes were reverted, I found {{para|text}} worked a lot more intuitively than {{para|lt}}. Flatly replacing {{para|text}} with {{para|lt}} resulted in this abomination: {{ill|Codifier of administrative-territorial units and territories of hromadas||lt=KATOTTH|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}} instead of the intended {{ill|lt=KATOTTH|Codifier of administrative-territorial units and territories of hromadas|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}}. Hecseur (talk) 13:52, 2 March 2022 (UTC)
  • :{{u|Hecseur}}, your first code is broken, it should be {{ill|Codifier of administrative-territorial units and territories of hromadas|lt=KATOTTH|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}}
  • ::{{tlc|ill|Codifier of administrative-territorial units and territories of hromadas|{{!}}lt{{=}}KATOTTH|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}} (yours) vs
  • ::{{tlc|ill|Codifier of administrative-territorial units and territories of hromadas|lt{{=}}KATOTTH|uk|Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад}} (mine)
  • :In other words, you have a blank parameter and it's breaking things. Primefac (talk) 16:02, 2 March 2022 (UTC)

:Note: for the purposes of this example, I have altered Primefac's response above, which in Special:Diff/1074859833, did not actually show any difference between{{br}} the faulty and and the corrected version, because the {{tl|tlc}} template swallowed the double vertical bar in the faulty one, emitting only one bar, and{{br}} thus hiding the fault. The correction is marked with WP:HIDDEN tags in the code above.

{{cob}}

I know I have fallen into this trap many times. I usually find it in Preview before publishing, but not always, as sometimes the mistakenly linked text isn't as long and I might miss it. Anyone *not* seen this problem before? Anyway, we can fix it with param validation, and I think we should. The easy/lazy way is to print a bold, red error message embedded in a malformed ill at the point where we recognize it, highlighting the "bad lang code" or whatever. Better is to check first, and render the error message *instead* of any part of an incorrect ill. Adding users Hecseur and Primefac. Mathglot (talk) 22:52, 14 January 2023 (UTC)

: Lang-code validation would also alert users to related problems such as the one raised by TadejM in the previous section on param ordering. Mathglot (talk)

::Prima facie, all templates should perform parameter validation, but I'm not aware of simple tools for template writers to achieve that. OTOH, I habitually use {{para|reason}} when I add maintenance templates, whether they support it or not. -- Michael Bednarek (talk) 01:41, 15 January 2023 (UTC)

::: Likewise, re: param 'reason'. As far as param validation, could've sworn I've seen some many-param templates invoking another one to validate their param list, but can't find it now. Mathglot (talk) 21:45, 9 August 2023 (UTC)

Glyph collision on quoted italics

When we have both {{para|quote|y}} and {{para|italic|y}}, a collision can occur between the last quoted letter, and the ending quote mark:

  • {{tlg|ill|loi Rivet|fr|quote{{=}}y|italic{{=}}y|v{{=}}sup|code=y|_show_result=y}}

We should insert a {{tl|hairspace}} to mitigate this:

  • (after fix) → "loi Rivet{{hairspace}}"{{thinspace}}[fr]

(Or, if we wanted to get really picky, only for final letters with wide ascenders, like, yes for t, but no for e; but that's overkill.) Mathglot (talk) 21:56, 9 August 2023 (UTC)

:{{done}}. Primefac (talk) 08:18, 10 August 2023 (UTC)

= Possible solution =

{{re|ReyHahn}}, based on the above, I think it's unlikely that you'll get consensus for the exact solution you wanted based on an added parameter. However, I have a proposed solution for you which I believe will get you the behavior you want, without adding new parameters or changing the behavior for anyone else. It is this: I propose that we add a css class to the foreign-link elements, and then you can add an optional css declaration in your your common.css which will hide them, so you will never see the foreign links, but you will see the red link. Behavior would remain the same as it is now for everyone else. Would that work for you, and does anyone else object to this?

Note that a finer-grained solution is also feasible, where you could opt out of specific languages you didn't want. That's workable, albeit a bit clunky, as you might have to opt out of a dozen commonly used languages, although you'd only have to do it once. An opt-in solution would be more logical, (e.g., "only show me fr, de, and es links") which, if feasible, would require a display:none on the main foreign-link element, and display:inline *after* it on the specific languages in your common.css, but I don't know if the css priority sequencing supports this. It sounds like it might work, because "if multiple declarations have the same specificity, then the last CSS rule declaration is evaluated and applied," ([https://blogs.halodoc.io/best-practices-that-we-follow-to-avoid-specificity-issues/#what-is-css-specificity link]) but testing would be required. Mathglot (talk) 22:27, 30 October 2023 (UTC)

: I see no reason to object to a solution where nothing changes unless you actively make a change to your setup. CapnZapp (talk) 12:54, 31 October 2023 (UTC)

ReyHahn, the sandbox now has a working version for you, but I haven't documented it yet; if you know how to use common.css, add a line .ill-group {display:none} and try it with the sandbox. Will get back to you later with details on how to try it out. Mathglot (talk) 17:57, 31 October 2023 (UTC)

: {{re|ReyHahn}}, to see how this would look, edit your common.css, and add this line:

:: .ill-group {display:none}

: After saving, be sure to reload the page per instructions in the Note at the top (under the pink box). You can then run a test comparing {{tl|ill}} live, vs. the sandbox version, in your sandbox, at Special:ExpandTemplates, or elsewhere. Try pasting the following into your test page:

* live: {{Interlanguage link|North face of the Eiger|fr|Face nord de l'Eiger|ca|Cara nord de l'Eiger|de|Eiger-Nordwand}}

  • sandbox: {{Interlanguage link/sandbox|North face of the Eiger|fr|Face nord de l'Eiger|ca|Cara nord de l'Eiger|de|Eiger-Nordwand}}

: and examining the output, and you should see the top (live) example generating the links you don't want to see, and the bottom one (sandbox) generating just the red link, which is what I presume you want. Alternatively, to run this test without having to create a test page for it, just [https://en.wikipedia.org/wiki/Special:ExpandTemplates?wpInput=%2A%20%27%27%27live%3A%27%27%27%20%7B%7BInterlanguage%20link%7CNorth%20face%20of%20the%20Eiger%7Cfr%7CFace%20nord%20de%20l%27Eiger%7Cca%7CCara%20nord%20de%20l%27Eiger%7Cde%7CEiger-Nordwand%7D%7D%0A%0A%2A%20%27%27%27sandbox%3A%27%27%27%20%7B%7BInterlanguage%20link%2Fsandbox%7CNorth%20face%20of%20the%20Eiger%7Cfr%7CFace%20nord%20de%20l%27Eiger%7Cca%7CCara%20nord%20de%20l%27Eiger%7Cde%7CEiger-Nordwand%7D%7D click here] to run it immediately in Special:ExpandTemplates.

: Let me know if this is what you were asking for. Mathglot (talk) 00:56, 1 November 2023 (UTC)

::Thanks for this effort. I tried to respond earlier to this issue but my IP was banned due to a proxy issue. It is certainly a solution but I think is not what I was looking for initially and also not what the conversation has evolved into. I was against any change and I was trying to find a solution for a user that wanted some alternative (without any red links). However the user was against any modification of the template. You may check the discussion at Help talk:Interlanguage links--ReyHahn (talk) 10:53, 1 November 2023 (UTC)

::: {{re|ReyHahn}}, thanks for the link. I responded over there, but it seems to be about a different topic. If the user simply wants to color all the non-ill (i.e., "regular") red links black, that can be done without any modification of the template. If they want to color all ill red links black, that can be done using the same method as described above (with an appropriate line of code in common.css). What doesn't make sense to me, is why someone would make a request for some change in behavior, but at the same time be 'against any modification of the template'. Why would they care whether the template got modified, if the behavior they are seeking comes to fruition? Also, I'm a bit confused by the overlapping discussions at the two threads, and I'm happy to help find a solution if there's a problem that needs one, but I'm not sure if there is a concrete problem or not, and if there is, I certainly don't know what it is. You don't have to respond here with an explanation if you don't wish to, as I'm happy to let this drop if that's where it's heading, but if there's a specific problem (here, or there) that might yield to a technical solution of some sort (template or not), please ping me and I'd be happy to provide an opinion on it. Mathglot (talk) 01:55, 2 November 2023 (UTC)

::::I feel slightly obligated to respond given the effort you made, thanks again. Indeed the conversation is confusing as it was (is?) being held in parallel in three threads at once (here, in WP:PHYSICS and in Help:ILL). I contributed to that mess by adding my request here. Maybe what is missing is how my position evolved. I have always supported {{t|ill}}, I like to know which other Wikipedias have articles when there is none. However, I sincerely think that {{u|Ldm1954}} is right in the sense that in the way that Help:ILL is currently written, there are alternatives to {{t|ill}} and editors can choose in between at will. I thought that Ldm1954 did not like {{t|ill}} because of the red link, so I was asking if we could add an option to remove the red link here (I think I was wrong, Ldm1954 does not like the sidelinks in {{t|ill}} either). This proposal (optional red link removal) seemed ok to me, it seems in accordance with the other unfavored alternatives in Help:ILL. After my request, we received enormous amount of feedback which seem to indicate the current version of {{t|ill}} not only is the preferred option but that it should be enforced against all other alternatives in Help:ILL. Now I have taken the position that if so many users agree on this, and changes to template {{t|ill}} are a no-go, then it is Help:ILL that should be modified to mirror the consensus.--ReyHahn (talk) 10:48, 2 November 2023 (UTC)

:::::It is always exciting to be horribly misquoted.

:::::For the record, this is what happened. ReyHahn make a polite and good suggestion that I add first names to people in a fairly large (140kb) article. I added many, including a Wikidata link to a very famous scientist who did not have one. Someone else, who had never previously contributed to the article barged in and (in my opinion rudely) removed the link.

:::::I politely raised the question of ways to link to people on WP:PHYSICS, including one to a different scientist who had an external PDF orbit. ReyHahn politely pointed to the TEMPLATE:ILL approach, so I used option 5 in H:FOREIGNLINK.

:::::Then the ¥$* hit the fan. My version was (again, IMHO rudely) changed, and I was informed, in effect, "thou shalt not use anything except TEMPLATE:ILL. Naughty boy."

:::::So I unsubscribed from these discussions until I was mentioned by name here and, unfortunately, again misquoted.

:::::My opinion is, and remains that TEMPLATE:ILL was a great idea until a year or two ago. Until recently every language was an island. Not now. The AI translation in browsers (and I noticed recently Gmail) is getting good, and will get better very rapidly. Just like everyone else, Wikipedia has to be able to adapt. You don't have to agree with me. Ldm1954 (talk) 13:33, 2 November 2023 (UTC)

::::::Links to people from within the prose of Wikipedia articles should be English language Wikipedia links (possibly red links), not Wikidata links or inter-language links or external links. This is a well established consensus policy, and enforcing it is not inherently "rude". –jacobolus (t) 13:38, 2 November 2023 (UTC)

::::::{{ping|Ldm1954}} I am sorry if I have misquoted you or oversimplified your side of the story. Could you please be more explicit on where does my version disagrees with yours? As of now, I think both are compatible. {{u|Mathglot}} was implementing a solution but did not have all the context, I had to raise your name again because it is not possible for me to summarize the situation without quoting you (I tried to use "user" above, but that seems more impolite). I am sorry that I have involved you in this talk page I really was hoping to find a better alternative when all of this started.--ReyHahn (talk) 13:54, 2 November 2023 (UTC)

:::::::ReyHahn, I have no problem with your initial suggestion about names etc, but the statement about "not liking redlinks" that has somehow become attributed to me is incorrect. My opinion is now, and always has been that 1) Daniel J Alpert or 2) Daniel J. Alpert (in German) are easier for the unwashed user than 3) {{ill|Daniel J. Alpert|de|Daniel Alpert}}. Reasons:

:::::::1) Is a universal language approach assuming AI translation. AI was not so viable when many of the consensus discussions took place. Consensuses change.

:::::::2) Mentions the language, as some wanted to know this. I included this to follow the "user first" principle.

:::::::3) To me both the Daniel J Alpert and the [de] are not self-evident. User first. How are they supposed to know that they should click on the de to open up a German language version? Standard html conventions indicate it will open a page called "de".

:::::::I don't agree with arguments of the type "users will learn". It is the job of coders to make life easy for users, not the other way around. This is something all programmers learn early (or should), just like adding comments so you and others can work out what you did 10 years later.

:::::::Hopefully others will understand my polite emphasis on user first rather than editor first. Ldm1954 (talk) 14:47, 2 November 2023 (UTC)

::::::::Thanks for clarification I will refrain from continuing saying that you disliked red links, it was just the impression I had at the beginning of these debates.--ReyHahn (talk) 15:49, 2 November 2023 (UTC)

::::::::This is a longstanding community policy which was established by widespread consensus and which has been repeatedly discussed going back to the beginnings of the project. If you want to change it, this is not the best place for it. You are welcome to start a petition at Wikipedia:Village pump (policy) but I wouldn't get your hopes up. For what it's worth I strongly dislike your alternatives (1) and (2), and under current consensus would not hesitate to remove them from the prose of English Wikipedia articles. –jacobolus (t) 15:01, 2 November 2023 (UTC)

:::::::::Please note, I was responding to a request for clarification about misquoting me. I am not proposing anything beyond stating an opinion. Ldm1954 (talk) 15:15, 2 November 2023 (UTC)

::::::::Ldm1954, regarding {{gi|the statement about "not liking redlinks" that has somehow become attributed to me is incorrect}} -- you did say in an [https://en.wikipedia.org/w/index.php?title=Electron_diffraction&diff=prev&oldid=1179664253 edit summary]: {{gi|I am not a fan of the red links}}. olderwiser 16:11, 2 November 2023 (UTC)

:::::::::Ldm1954, your "opinion is now, and always has been" stated above fails to recognize the benefits of {{tlf|ill}}: a) a red link to a subject that's covered in another Wikipedia is (almost always) a good thing – EN Wikipedia needs that article; b) if such an article is created here, the link will turn blue. Your proposals fail on both counts. -- Michael Bednarek (talk) 00:39, 3 November 2023 (UTC)

:::::::::: FWIW, re: {{tq|Now I have taken the position that if so many users agree on this, and changes to template ill are a no-go, then it is Help:ILL that should be modified to mirror the consensus.}} I disagree that HELP:ILL (specifically: H:FOREIGNLINK) doesn't mirror the consensus. That text already states {{tq|The best practice is to use the template interlanguage link which gives both a redlinked English link and a German blue link, but hides the German link if the English redlink turns blue when the article is created.}} which I wholeheartedly agree with. I also specifically think it is good that this choice (number 1 on the list) isn't enforced (i.e. that other alternatives exist) and that it is "only" recommended. It clearly states which option is "best practice". 3) {{ill|Daniel J. Alpert|de|Daniel Alpert}} (at the time of writing, Daniel J. Alpert doesn't exist at English Wikipedia but does at German Wikipedia) is far far preferable to 1) Daniel J Alpert or 2) Daniel J. Alpert (in German): I think users can handle ill links just fine, and even if you think the alternatives are slightly better UX-wise, there are other benefits to {{tlx|ill}}: a) it is clear the link is special (which means the user isn't astonished to find themselves somewhere else) and after the first time, will understand the ill format tells them the link leaves English Wikipedia, b) the red link stares us editors in the face "daring" us to write a new article, and c) the foreign-language link disappears once that has happened. I don't see that translation is reaching Star Trek levels of universality at all, and besides, we shan't assume all our readers is using a particular browser or plug-in anyway. Finally, please understand that if you want change, discussing multiple issues at multiple venues is a horrible practice - as we can see here, it is much more likely to result in people wasting their time chasing imaginary proposals than actual change. PLEASE assume responsibility for your choice of discussion method, Ldm1954 and ReyHahn, and think about how to improve it in the future. Thank you CapnZapp (talk) 11:44, 4 November 2023 (UTC)