Genesis edit

See Commons:Village_pump/Archive/2009Sep#Link_problems to discussion about origin of this template. --Jarekt (talk) 12:57, 26 July 2010 (UTC)Reply

Missing language codes edit

At least hy seems to be missing. Template should be checked if it includes Special:PrefixIndex/MediaWiki:Lang (or better, all languages supported by mediawiki). Multichill (talk) 22:04, 3 December 2009 (UTC)Reply

I added a couple for now. I'll do a full language review & update for these templates (as well as elsewhere). We shouldn't use MediaWiki codes as a basis for what to include because: a) lang codes are sometimes added (and then removed) to MediaWiki without any actual use (0 projects/0 interface support) b) they use invalid conflicting codes instead of trying to use only ISO ones like do for translations c) we use alternate codes depending on what the translators prefer (e.g. be-tarask instead of be-x-old) d) we use many codes not supported by MediaWiki (interface wise). If you meant all the codes {{#language:}} understands, I think that would be a bit too much (but even that doesn't have every code we use; I started {{Language2}} for some of these). I maintain a full list of these plus any additional languages I see in the wild used on Wikimedia with this template. Rocket000 (talk) 01:43, 4 December 2009 (UTC)Reply

Formatting language names edit

Hi there, I see that the template formats the language names in a different way from what does {{#language:lang_code}}. For example, it generates "Français" while {{#language:fr}} would generate "français". I've looked at the source code of the template but couldn't be bold enough to try to fix this, thus my comment here :)

Any ideas? (pro/cons/howto...) Best regards, AlNo (discuter/talk/hablar/falar) 15:40, 12 July 2017 (UTC)Reply

Well finally I did it... -- AlNo (discuter/talk/hablar/falar) 09:08, 13 July 2017 (UTC)Reply
Why don't the language names have consistent capitalization? What can be done to correct that?   — Jeff G. please ping or talk to me 19:39, 5 August 2020 (UTC)Reply
@Jeff G.: Change half of the human languages in the world. 🙂 This is simply a language convention: in English language names are always capitalized, but en français this is not the case. —Tacsipacsi (talk) 21:01, 5 August 2020 (UTC)Reply
@Tacsipacsi: Sorry, I guess I was being aglocentric.   — Jeff G. please ping or talk to me 00:50, 6 August 2020 (UTC)Reply

Sorting by language code is wrong edit

When I use this template, for some reason it is sorted by script rather than alphabetically by language code, why is this? And how can I fix this? I think that it would obviously be more useful to sort by language code. --TKsdik8900 (talk) 05:04, 12 June 2021 (UTC)Reply

Why on earth subst:lle can automatically remove Japanese and Portuguese links now? edit

See my diffs: Special:Diff/670602412, Special:Diff/670604724 and Special:Diff/670604744, this panorama is really beyond my control. Liuxinyu970226 (talk) 07:56, 2 July 2022 (UTC)Reply

Note: some recent trials told me that /zh-* and every RTL (Arabic, Hebrew, Persian, Yiddish, ...) languages' translations are now having this issue. Liuxinyu970226 (talk) 06:25, 8 April 2023 (UTC)Reply
still broken like @Liuxinyu970226 described --Sebastian Wallroth (talk) 14:33, 1 May 2024 (UTC)Reply
@Multichill maybe you can have a look at it? Tank you in advance. --Sebastian Wallroth (talk) 14:37, 1 May 2024 (UTC)Reply
@User:Jarekt: I'm very sorry for pinging you for this topic. I wanted to update Template:PD-Iran/lang using
{{subst:lle}}
but faced this issue instead, years ago I remember this was working even when Lua didn't exist and it was OK back then as far as I remember but now is hitting the issue explained in Module:Languages/List/doc and bug:T49137 apparently (if I understand correctly?) so my question is what is the direction here, if is needed I can replace the whole procedure with some JavaScript web code for some user groups as we have such processes in fawiki (am imagining reading from the result Special:PrefixIndex with a API call and applying directly might be more reliable) but that seems inflexible and overkill so maybe some Lua based solution still can be possible? To me that putting languages with RTL script after LTR seems unnecessary (and discriminating) specially given we adopted bdi tag years ago but I'll understand if some like to have that but that apparently is a part of the issue here. Sorry again and thanks −ebrahimtalk 13:45, 3 June 2024 (UTC)Reply
@Ebrahim, Sebastian Wallroth, and Liuxinyu970226: I looked into it. I was able to reproduce the problem at Template:PD-Iran/Baloch (unused broken template) where {{Lle}} listed 5 out of expected 10 languages. To explain the issue, let me explain how {{Lle}} works:
  1. the template fetches a list of 589 languages supported by MediaWiki
  2. languages are sorted somehow, by a code that sorts latin alphabet letters before non-latin alphabet letters
  3. for each language a wikitext line is generated, that looks like: {{subst:#ifexist:Template:Unblock/en|[{{subst:fullurl:Template:Unblock/en}} English] ∙ }}
  4. When page is saved it is trying to execute those 589 {{#ifexist}} calls; however since those are considered "expensive parser function calls" the code quietly quits after 500, dropping 89 languages. Due to sorting all those languages use Chinese, Arabic, and other non-western scripts.
Since number of supported languages (now 589) become larger than number of allowed "expensive parser function calls" (now 500) we had many issues with language related templates, breaking many parts of Module:Languages without a hope of fixing it. Earlier this year, I fixed Template:Lang links (used by {{TemplateBox}}) by redirecting calls to Module:Languages with calls to new Module:Lang links module which used a hardwired list of 108 languages for which we actually had language subtemplates. This approach works as long as we are not introducing new languages for which we should check. I can try to rewrite {{Lle}} to use the same approach. --Jarekt (talk) 16:30, 3 June 2024 (UTC)Reply
Thank you @Jarekt for your efforts. {{Special:PrefixIndex/Template:PD-Iran}} returns the list of existing subpages. Than sorting out just language files from this list would not create too much parser function calls, right? Is this possible? Kind regards, --Sebastian Wallroth (talk) 17:41, 3 June 2024 (UTC)Reply
Sebastian Wallroth the approach to call "Special:PrefixIndex" from Lua stopped working about a decade ago. We had a module for it Module:Page which according to it's documentation no longer works. --Jarekt (talk) 18:39, 3 June 2024 (UTC)Reply
Thanks for the detailed and fantastic explanation, now I see why it doesn't actually work thanks to your description. I think what your purposed solution is the most plausible for this but I think also about raising expensive parser function calls to 750, at least for Commons as another option, and here is prototype of my solution using JavaScript codes, if you click on "Update" button on edit notice of https://commons.wikimedia.org/w/index.php?title=Template:PD-Iran/lang&action=edit a page containing list of subpages of the template will be reveled, guess we can just use {{subst:lle}} here even, the button is currently adminonly so you can just test and remove it from MediaWiki:Commons-editnotices-template-subpage-lang after the test and it's code is here MediaWiki:UpdateLang.js. −ebrahimtalk 20:10, 3 June 2024 (UTC)Reply
User:Jarekt: Now the prototype replicates lle's output and ordering also, guess is worth to look at least though not sure if we want drop lle logic altogether. −ebrahimtalk 21:21, 3 June 2024 (UTC)Reply
ebrahim I guess you were working on javascript and I was looking at fixing lua. I added support for {{Lle}} to Module:Lang links and swap {{Lle}} to use it. Previous {{Lle}} did not used the correct ordering of languages, as Languages are usually sorted by their language code (see for example w:Wikipedia:Language order poll). The code uses a hardwired list of 231 language codes which match any subtemplate on commons whose name matches language code. So {{Lle}} should be working again. That said I like your javascript approach. If we get both to work we can have 2 separate redundant systems. --Jarekt (talk) 22:52, 3 June 2024 (UTC)Reply
User:Jarekt: Fantastic, just made it to use lle but commented the old code so we can revert if needed. −ebrahimtalk 23:02, 3 June 2024 (UTC)Reply
Return to "Lle" page.