Template talk:Localized link


As a possible workaround for the problem of Special:MyLanguage not properly tracking backlinks, I've added an invisible unlocalized link. I'm not particularly familiar with the intricacies of translation, though, so if that starts popping up redlinks all over the place, it should be reverted or modified as needed. Robin Hood  (talk) 23:32, 15 August 2015 (UTC)Reply

@RobinHood70: If {{{1}}} is a category e.g. Category:Extension, this template wrongly adds all translation pages into the category. --Shirayuki (talk) 03:48, 23 August 2015 (UTC)Reply
Thanks. I put a leading colon into the link, which I believe should work in all namespaces, even if it's only officially used for categories and files. If that creates any additional issues, let me know and I'll put in proper namespace checking. Robin Hood  (talk) 13:26, 23 August 2015 (UTC)Reply

At Help:Contents#Editing, I noticed a broken link, which should look like:

but looked like:

  • [[Special:MyLanguage/Help:Talk pages|]]

which was the result of the code {{ll|Help:Talk pages|nsp=0}}, which works fine for other links, but mysteriously not for Help:Talk pages.

I first used the workaround of linking to a redirect to fix the link:

  • {{ll|Help:Talk page|2=Talk pages}}

Then I tried a leading colon:

  • {{ll|:Help:Talk pages|nsp=0}}

which works. --Pipetricker (talk) 14:10, 1 February 2018 (UTC)Reply

The problem is the template trying to get the translation of the "Page display title" of the target page, which was blank because of a IP edit, causing the link to end in the "pipe trick", which only works when not used in a template. --Ciencia Al Poder (talk) 10:55, 2 February 2018 (UTC)Reply
Thanks. Of course it had to do with the translation system, which I'm largely clueless about. --Pipetricker (talk) 12:28, 2 February 2018 (UTC)Reply

Untranslatable category


{{#translation:}} should be added to the category on this template to prevent all of its translations from ending up in Category:Internationalization templates. --Sabelöga (talk) 00:22, 6 July 2021 (UTC)Reply

Erroneous text added by template


On Help:Linking to files, there is a text link labeled "dsewwwdw" added by Help:Editing pages . --TooManyTabs (talk) 18:54, 30 December 2021 (UTC)Reply

LanguageConverter syntax breaking PAGENAME: when stripping off the namespace

{{Edit protected }}
      |<!-- otherwise, handling here with LanguageConverter syntax support -->

It should be handeled by "identifiying the converter syntax => stripped off till the first colon" instead when "{{PAGENAME: returned empty value". --Winston Sung (talk) 11:41, 21 January 2022 (UTC)Reply

This should be enough, it adds a check to ensure the returned value of {{PAGENAME: is not empty:
https://www.mediawiki.org/wiki/Template:Localized_link/sandbox?diff=5826177&oldid=5826172&diffmode=source Winston Sung (talk) 01:52, 15 March 2023 (UTC)Reply

bizarre ?  : nsp=0 but the Namespace is still displayed on translated pages


Form nsp=0 displays correctly no namespace for the EN page i.e. 'Rollback' here below

=== {{ll|Manual:Rollback|nsp=0}} === 

but the namespace still appears on the translated pages !

Christian 🇫🇷 FR (talk) 15:08, 27 August 2022 (UTC)Reply

It can remove only namespaces known to MediaWiki, i.e. English ones. It cannot figure out that Manuel is meant to be a namespace name, since it’s not defined as such in software. —Tacsipacsi (talk) 08:47, 29 August 2022 (UTC)Reply
So the advice would be NOT to translate the namespace value (or to suppress it) on the translated page, in order to keep its original form and prevent from NS display, specially in menus when we dont wish them.
Christian 🇫🇷 FR (talk) 15:41, 11 October 2022 (UTC)Reply
Template could also remove what precedes the ':' since nsp=0 without wondering the NS is recognized or not. This is another way to follow parameter role.
Christian 🇫🇷 FR (talk) 15:46, 11 October 2022 (UTC)Reply
That wouldn’t work, titles of mainspace pages can also contain colons. Do you really want the title of Reading/Web/Desktop Improvements/Repository/Research and design: Phase 1/fr to appear without namespace as phase 1? —Tacsipacsi (talk) 17:29, 11 October 2022 (UTC)Reply
I don't think anybody should use nsp=0 if the page is in mainspace. Aaron Liu (talk) 17:31, 20 January 2024 (UTC)Reply
General solution:
Namespace should be translated separately from the page display title.
This issue need to be fixed in the extension. Winston Sung (talk) 01:54, 15 March 2023 (UTC)Reply

Edit request


{{Edit request }} Please merge the sandbox page into the main template. It automatically takes the part after the colon when |nsp=0. See Template:Localized link/zh#Test cases for results. Aaron Liu (talk) 17:11, 18 May 2024 (UTC)Reply

@Winston Sung Do you see any cases where this could be worse? Aaron Liu (talk) 23:43, 21 May 2024 (UTC)Reply
Currently looks good to me. -- Winston Sung (talk) 04:25, 22 May 2024 (UTC)Reply
Emmm... looks like there might be some edge cases. Trying to fix... -- Winston Sung (talk) 11:59, 22 May 2024 (UTC)Reply
Which edge cases would these be? Could you add them to the test cases? Aaron Liu (talk) 12:49, 22 May 2024 (UTC)Reply
Fixed. -- Winston Sung (talk) 14:53, 22 May 2024 (UTC)Reply
Thanks! Would you be interesting in requesting admin rights to be able to implement these changes? Aaron Liu (talk) 01:01, 23 May 2024 (UTC)Reply
I've applied the changes to the template Ciencia Al Poder (talk) 14:58, 24 May 2024 (UTC)Reply
This appears to have caused errors in pages such as Help:Special pages/de. * Pppery * it has begun 22:03, 24 May 2024 (UTC)Reply
Okay, it appears that this fails on every single non-zh language with any localized title...
@Ciencia Al Poder Could you revert the changes in the meantime? Thanks! Aaron Liu (talk) 00:05, 25 May 2024 (UTC)Reply
I've reverted. * Pppery * it has begun 00:29, 25 May 2024 (UTC)Reply
@Pppery I just added some conditionals to the sandbox. Do you see any further errors? Aaron Liu (talk) 14:51, 14 June 2024 (UTC)Reply
I can confirm that specific error doesn't show up in the sandbox version (I disabled translation-aware transclusion on this page so you can now see that yourself using the "preview page with this template" option). I obviously can't confirm that none of the 35,000 pages that use this template (the fifth-highest-used template on the project) won't produce new errors, and do not want to use my own admin tools to redeploy it, but have no objection to another admin doing so if they're convinced it won't break things. * Pppery * it has begun 16:19, 14 June 2024 (UTC)Reply
Thanks. @Ciencia Al Poder, what are your thoughts on this? Aaron Liu (talk) 16:42, 14 June 2024 (UTC)Reply
I'm not confident this change will break anything. Ciencia Al Poder (talk) 14:06, 15 June 2024 (UTC)Reply
@Ciencia Al Poder: I think you have the wrong number of "not"s there. * Pppery * it has begun 14:09, 15 June 2024 (UTC)Reply
Assuming you are missing another not, that's okay. @Shirayuki I've tested this on several pages thanks to the TemplateSandbox extension. Would you like to merge the change? Aaron Liu (talk) 03:11, 16 June 2024 (UTC)Reply

Template documentation grammatical errors


There exist a lot of grammatical errors in the template documentation, for example "Should better be substitute this template", etc. I could not make the change myself because the template page was fully-protected.

I propose that we replace the "Usage" and "Usage in translatable pages" sections with this.

If I missed something feel free to correct me. Rusty4321 (talk) 15:24, 11 November 2023 (UTC)Reply

Return to "Localized link" page.