Template talk:Languages

From OpenStreetMap Wiki
Jump to: navigation, search

Only for English pages

You can use it only to point from English page to others.

For other languages we can point to the English version, as a main page.

--Rodrigo 19:14, 21 November 2006 (UTC)

OK I've just implemented that for OpenStreetMap License. So I've translated the words 'English and other languages' into different languages (using babelfish) and used this as the link text to point back to the English version. That seems to be satisfactory, at least you can navigate between the pages properly and consistently. A better solution might be possible, the one suggested below perhaps. -- Harry Wood 16:58, 3 May 2007 (BST)

Redesign of the Language Linker

I wrote another version of the language linker, which allows translated pages to have proper names instead of <langcode>:<english_title>. Aditionally, it can be included in non-english pages. The new linker should be downward compatible, so it could replace this template without problems.

You can find the template (including documentation) here: Template:Language Links experimental

--Fnord 15:38, 8 February 2007 (UTC)

So this is better than Template:Language Links, because it's a bit rubbish having to work with english page names. And on (for example) a german page you would ideally have links to the italian page etc, rather than only linking back to the english page. In other words it makes it a bit less english centric.
It has the disadvantage that it is harder to use. It's a more unweildy messy block of wiki text appearing at the top of the page, which makes any editing of the page a more confusing experience for wiki-newbies.
I think one thing to consider is that if translation and other wiki activity in other languages were to ramp up, and the project became much less english centric, then english users (and indeed all users) would start to find all the other language activity on 'Recent Changes' would be an irritation, and there would be calls for a proper multilingual implementation wikipedia style, with an entirely separate wiki database for each language (technically quite tricky to acheive). That's the extreme multilingual end of the scale. At this stage it's obviously a predominantly english speaking project, and the more simplistic template reflects that. The Template:Language Links experimental is a kind of half-way solution, but not without its disadvantages as I say.
Just some thoughts. I think if we make sure the Template:Languages is used properly (it should only be placed on the base english pages) then it would be clearer to see why the more complex template might be better -- Harry Wood 14:14, 21 May 2007 (BST)

Mediawiki Magic_words

I tried to use {{PAGENAME}} (See Mediawiki:Help:Magic_words) but it seems that some language-namespaces like DA an JA are not registered correctly and {{PAGENAME}} returns "Da:Sitename" instead of "Sitename" --Phobie 11:24, 2 December 2008 (UTC)

Change layout

I would change this template to look like Template:Languages. Benefits are: same look, not so prominent, much easier to read or change. -- ck3d 17:43, 20 December 2008 (UTC)

+1 --Phobie 15:37, 21 December 2008 (UTC)

Template talk:LanguageNew

This is a template that lists all languages available. It is based on parser functions from mediawiki. The problem is that it is using a naming scheme of PAGE_NAME/LANG, e.g. Mainpage/sv instead of sv:Mainpage or sv:Huvudsida.

Some one needs to understand how this works before it's used. Erik Johansson 12:21, 19 August 2008 (UTC)

ACK. I'm not able to use it :-( Stammfunktion 09:33, 10 October 2008 (UTC)
I've created a new template that works ok, although there is room for improvement. It's nearly ready for prime time. Template:LanguageTest. Preview it here: Test. For English pages, it gives precedence to [[En:Page]] over [[Page]] for the moment. -- Firefishy 10:47, 10 October 2008 (UTC)


I think it that this system is not very intuitive. It demands that all the pages ("files") have the original English name as title, with the prefix for the language code. The problem is many people in other languages do not know the appropriate English name for the concept that they are looking for. Also, it looks awkward to generate a namespace just for the language code. That does not look nice (De:Map Features). Also, it makes it very difficult to find a page with the in-build search box (if you do not know the English name). I prefer the appropriate page titles of each page, which are then combined as links in the multilanguage template ("the old system"). The disadvantage is that you have to generate a template for each topic page which has to be added to if there is a new language version. The benefit is that the page title is more intuitive. Longbow4u 11:22, 30 August 2008 (UTC)

Better use redirect-pages if a localized name is needed. I.e. de:Karteneigenschaften --> de:Map_Features. If you do not know any English it will be very hard to use OSM anyways! --Phobie 18:52, 18 December 2008 (UTC)


Test, Newarticletext, Bot, NS, lang- ersetzen/löschen.

simplify the language template

  • remove text "Other languages"
  • remove text "Missing languages:"
  • always show all languages (you can see which languages are missing because the links are red)

--Phobie 03:56, 5 January 2009 (UTC)

Well I quite like the way it's hiding the red links, but it does need simplifying or rearrange to use less vertical space. 'Other languages' could appear to the left of the language list, and we could have a 'show missing languages' link on the right. That way it would all fit on one line.
I might have a play around with this at some point, but need to be careful not to break it. -- Harry Wood 10:11, 7 April 2009 (UTC)
I also think that we should remove the "Missing languages:" bar but keep the "Other languages". A link to the missing translation page is only interresting once for translators who can anyway find out the right page name. -- Pieren 10:49, 4 May 2009 (UTC)
I dont like the gray "missing-languages"-bar. I would prefer:
Title-bar: "Available languages" plus smaller: "Help" and "Missing languages"
Box: with all the available languages. --Markus 19:07, 4 May 2009 (UTC)
My suggestion does not work, because the PullDown does only work with content enclosed directly under the title bar.
May be we delete the gray "missing languages", put the link "show missing languages" in the first gray "languages"?
and somebody writes a tool which opens an other window with the missing languages? --Markus 15:39, 7 June 2009 (UTC)

I do not care about the design. My proposal is about speed. You should have a look at wikipedia:Wikipedia:Template_limits#Expensive_parser_function_calls Category:Pages_with_too_many_expensive_parser_function_calls! The "#switch" and the "#ifexist" functions costs much time. The solution is to always show all languages or to use a bot which runs once a day! --Phobie 15:29, 19 June 2009 (UTC)

I agree that Phobie said first. The numbers of "#switch", "#if" and "#ifexist" become over 100 which is the maximum limit of parser function. So a part of "Missing languages:" box don't work correct now. I tried to reduct the number of conditions however it seems to reach a limit. By simply just deleting "Missing", the count become the half. I don't agree with using bot. Bots are going to make too many Template:language-xxx like before using this template, right? I didn't like the way. --Nazotoko 20:05, 19 June 2009 (UTC)
No, a bot does not need many templates. It could extend Template:Languages. After a first full-page-run it only needs to run on page creation. Just removing "Missing languages:" is not a good solution! While we get below the 100-limit the template would be still time-consuming. --Phobie 23:45, 19 June 2009 (UTC)
It looks worse idea than many templates. Do you really think that scripting such a long script like Template:Language-mp on top of each pages are useful? Although they can save processing time, they consume much data storage and editors' concentrations. I think checking page existences are not hard for Mediawiki, because it always checks existences for each links. The count limit is set for a security reason to prevent from endless loops. So Wikipedia just increased the limit to 500 for heavy templates. Even if checking cost are small, we meet the fact that the Missing Box doesn't work now. Increasing the limit to 500 by an administrator is the easiest solution, I think. --Nazotoko 03:19, 20 June 2009 (UTC)
The Languages template at mediawiki.org manges without #ifexist. --Wynndale 15:52, 20 June 2009 (UTC)
You are right. If we give up to separate the "Missing Languages", we don't need to use #ifexist and bots. --Nazotoko 07:22, 21 June 2009 (UTC)

The missing languages box works again, because the count of #ifexist are reduced to 83. I have made another template which has the same format but a half number of #ifexist. The count become 42, so we get capacity for another 58 languages. The processing time was reduced from 1.2 seconds to 0.8 seconds. Accuracy 0.8 seconds is long for server. For example, a heavy page Map Features takes just 0.4 seconds to generate the whole page. However, it is not so long to damage server's CPU and it is short time for people. --Nazotoko 07:22, 21 June 2009 (UTC)

I applied the new template to this. Because the links in the template was changed, mediawiki server updates its connection database at the first template call. It takes very long time but from 2nd call, the processing time becomes less than 1 second. --Nazotoko 05:48, 22 June 2009 (UTC)

EdLoach, revert the template. Your template is not simple. your template use 89 #ifexist, 2 #switch and it is hard to understand where we should write a script for a new language. And it consuming 1.2 seconds for each page. You can get those information from the html source. This templates is one of the most linked templates. Take care for the processing time. I think what you want to do is just adding translations of the messages but I deny it for the reason on "Talk:Wiki Translation#Translating messages in Template:Languages?". --Nazotoko 23:16, 28 June 2009 (UTC)

OK - I hadn't spotted this talk section before, and had tried emailing you about your changes before I made any but you don't seem to have an email address linked to your wiki account. I am fairly new at wiki editing, so reading the above about the number of parser functions now makes a bit more sense about your previous changes. The problem as I saw it with the version I overwrote was the difficulty in adding new languages - when you added Esperanto the other day to the English interface I then added it to the Fi and De interfaces; if it gets to the stage where we have an interface per language then adding support for a new one becomes a fairly time-consuming task. I was trying to make this so that the template would only use one list of languages, so adding say {{{eoe|}}} and {{{eom|}}} could be done in one place. I realise now that the way I've done it has doubled the number of ifexist calls, so will revert it as you suggest. But if there is some way that the interface can be simplified so adding a language can be done without the need for modifying every interface template that would be an improvement. --EdLoach 07:43, 29 June 2009 (UTC)
I didn't notice my email access of the wiki was closed. I opened it. By the way, discussions about common things should be opened for all. You should use my talk page instead of emails. Template of Mediawiki is a dull program language. The grammar don't allow templates and parser functions to make new {{anotherTemplateCalling}} nor {{{parameterSubstitution}}} because it is technically too complicated and danger to cause a stack memory flow. Although it looks stupid, we should write {{{are|}}} {{{bge|}}} ... {{{zh-twe|}}} in each Interfaces. To reduce the number of #ifexist, I use a little advanced technique, variable parameters. Template:LanguageExisting selects the parameter name from 'xxe' or 'xxm' by the existence, so the interface templates are assumed to have a pair of 'xxe' and 'xxm'. You cannot separate the pair from interfaces. The Template:Languages/Interface is required to work this technique. The interface selector (2nd parameter) is just a extra function. I assume it to be used for more big redesigning than message translations, for example showing them in table, side-bar or itemizing. However, the default interface must be simple because of the problem about processing time. --Nazotoko 21:35, 29 June 2009 (UTC)

There was bunch of changes made by User:Verdy p yesterday which seem to relate to performance of this template. Not sure what's going on here, but I notice that all pages are now reporting the 'too many expensive parser functions' message. -- Harry Wood 15:23, 4 January 2012 (UTC)


It would be fine to run a bot, implementing the template in all pages... --Markus 19:07, 4 May 2009 (UTC)


Who understand the usage of the two parameters? and can explain it in the Doku? Thanks, --Markus 15:39, 7 June 2009 (UTC)

Language addition

Can anyone add "Simplified Chinese", "Traditional Chinese" and "zh-hk" parameters for "简体中文", "繁體中文" and "中文(香港)"? I noticed that some of the articles in this wiki are in the above namespaces, and is inconvenient to change the names. AdeKaka' 09:56, 13 June 2009 (UTC)

I think "Simplified Chinese" and "Traditional Chinese" are too long for namespaces. I counted the pages which have the namespace "Simplified Chinese" or "Traditional Chinese". They are just 9 and 12. So I recommend to move them to "zh-hans" and "zh-hant". --Nazotoko 20:05, 19 June 2009 (UTC)

Template:Languages embedded in Template:ValueDescription

While I think this is a good idea, I noticed that because it is embedded as {{Languages|1=Tag:{{{key}}}={{{value}}}}} the Proposed Features pages which also sometimes use the template don't (and can't) use this for translations of proposals.

I was wondering whether perhaps the best solution to this was to have a Template:ValueDescriptionPF which had the template embedded as {{Languages|{{PAGENAME}}}} or similar?

Of course we then may also need translations of that template as there are for ValueDescription.

--EdLoach 10:26, 30 June 2009 (UTC)

I am not sure what did you want to discus. Do you want to make translations of the proposals? If you want to, discussing on Template:Proposed feature is better. But I think nobody wants to make them. They are temporary articles like news and discussions. Most of people think those should be in English. Did you read DE:Proposed_features (Google Translate Logo.png translate) ? It says "The proposals are regularly written in English in order to make everybody to understand.." in "Wie also vorgehen?". If you want to use this template for pages named "Prefix:lang/suffix", you need to extend templates from Template:LanguageExisting and Template:LanguageLink. But you should not apply them to this Template:Languages, because it must increase the processing time. Make it as another template. Statistics of the wiki tells me that 1 view request is in 3.6 seconds. It means if the average processing time for each pages exceeded 3.6 seconds, the sever could not answer for all requests, and it would be down everyday. Do you understand how serious we are for the processing time? --Nazotoko 01:38, 2 July 2009 (UTC)

Category "Pages with language links"

Why does this category exist? Imo, no reader of the wiki will look for pages with language links, so the category unnecessarily clutters category lists. Especially so as the What links here tool can tell you where this template is being used as well, without any categories. --Tordanik 15:27, 16 July 2009 (UTC)

Yes, remove the cat. and add your link to the proposal description! --Phobie 03:52, 18 July 2009 (UTC)
"proposal description"? Do you mean the template description? If yes, isn't the link in the "toolbox" on the left enough? --Tordanik 13:26, 18 July 2009 (UTC)
Yes, sorry, it was too late... --Phobie 02:50, 19 July 2009 (UTC)
I don't think this category is needed either, but note that there are other templates using this category, for example Template:Languages. --Nazotoko 16:51, 18 July 2009 (UTC)

This category is useful for translators. Keep it! --Lulu-Ann 09:41, 31 July 2009 (UTC)

Please state a concrete use case for something that is possible with this category and not with a "What links here"-check. --Tordanik 12:57, 31 July 2009 (UTC)
A translator is a person able and willing to translate, in this case wiki pages. Looking for new tasks, he/she will work on the pages listed in this category. I would even propose to have a category for each language missing and already translated, so translators can have a look at their languages only while non English understanding users can find pages in their languages.

--Lulu-Ann 10:23, 3 August 2009 (UTC)

Your use-case fails the "and not with a 'What links here'-check" part. It's a non-issue anyway, because we have so many pages without translations that looking for new tasks requires nothing but Special:Random or simply using the wiki for a while (which has the advantage of letting you find out what pages are actually worth translating).
And I have yet to see users without a knowledge of English that come along saying "hey, I want to find a page in my language, I don't care about the content", rather than "I want to find a page in my language about X". The latter is perfectly possible using the wiki search (you can select namespaces there) and does not require categories at all. --Tordanik 13:45, 3 August 2009 (UTC)
I have added Macedonian to the template now the main page uses it, and have taken the opportunity to remove the category at the same time so that there’s only one regeneration.--Wynndale 16:44, 2 September 2009 (UTC)

Language Addition: Amharic


how is the process of adding a language? I added "am" already to the template - when will it appear in the list of (missing) languages for a page? Can anybody check/fix this? Thanks! --Alexm 16:17, 10 October 2009 (UTC)

I am sorry to answer it late. I have added your language, Amharic. You were needed to edit Template:Languages/Interface, too. --Nazotoko 19:26, 11 November 2009 (UTC)

Languages and politics

User:Thehada recently translated the Potlatch primer into Serbo-Croat but unfortunately saw fit to put it into the “BS” namespace on its own. This kind of action may, for instance, discourage other Serbo-Croat speakers from keeping it up-to-date, which would leave out-of-date information where new users will see it. I have therefore removed the “BS” namespace from the template and asked for the page to be put in the same namespace as the other Roman Serbo-Croat pages. Andrew 20:09, 14 February 2010 (UTC)

As I've commented on User_talk:Wynndale, please stop this madness. Croatian and Bosnian and Serbian are three different languages. The so-called "Serbo-Croat" Yugoslav standard for group of languages ceased to exist 20 years ago with the bunch of intra-Yugoslavian wars. (see wikipedia:Serbo-Croatian for example). Note that current standard ISO3166-1 and ISO639-1 defines only "HR" for Croatian, "SR" for Serbian, and "BS" for Bosnian. There is no such thing defined as "SH" for Serbo-Croatian.
Additionally, starting such enormous actions (as renaming namespaces!) without even trying to contact interested parties (for example http://lists.openstreetmap.org/listinfo/talk-hr lists for Hr: namespace) is very bad thing to do, even if you are sure it is such a bright idea (which it is not). Yeah; average Croat might understand over 70% of Serbian language out of the box (but only if rewritten in Latin script instead of Cyrillic, as Serbian is usually written), but so might average Swede understand the Norwegian, and nobody is pushing "Swedish-Norwegian" language. Add to that the political tensions (ex-Yugoslavian countries were in open war not that long ago, killing each other for years over exactly such issues !), and you'll see it is hardly a smart move, especially if you pull it without consulting with interested parties. I've undone most of the damage done today to Hr: namespace, but please revert the other stuff you've damaged without consulting with interested parties. Thanks. --mnalis 18:21, 28 February 2010 (UTC)
Croatian, Bosnian and Serbian are very similar dialects (like Bavarian and Low Saxon). So for linguistic reasons it is a good idea to join them into one namespace here (like we have only en and not en-gb and en-us).
ISO 639 defines Serbo-Croatian as macrolanguage with the code hbs the old code sh has been deprecated, but it is still a good code because off sh.wikipedia.org!
The average Croat might understand over 99% of Serbian language out of the box.
Swedish and Norwegian are much more different then Serbo-Croatian languages! See wikipedia:North Germanic languages! Serbian to Croatian is more like Bokmål to Nynorsk.
The central government made war against splitting regions (and lost). Differences in the dialects where not involved into the conflicts! Later they have been used as delimitation for political reasons.
Perhaps you should read wikipedia:Shtokavian dialect.
--phobie m d 13:32, 23 July 2012 (BST)
no, Croatian/Bosnian/Serbian are not dialects, nothing like that (the rfc5646 for example mentions macrolanguage similarities - they are programmer thingy to make translations easier, and not implications that the language is the same and need not be translated). They are separate languages. You have several dialects of Croatian (and then several accents - and those are not accents in the simple English meaning), and a thing called "Standard Croatian" which is what is used in HR: namespace in order for it to be completely intelligible to all Croats. The linguistic issue is extremely complex here, even for native people who spent decades on the subject, so please do not presume that few hours of web surfing might give you even the passable idea of the problem. I will not go here into deep discussions over the language here (nor do I think it is possible - it would take extreme amounts of time and effort to explain, much more than I'm likely to write even over few months of dedicated work, and probably much more than you're likely to read), I will only reiterate that there are extremely strong feelings and political tensions over the language issue (and yes, Croatia for example did get in the war in considerable part over being denied official use of their language and identity).
So again, please, follow the BCP and be absolutely sure to reach the consensus in *all three* "sides" (on respective mailing lists, and not somewhere where almost nobody is following the discussion) before attempting any kind of massive namespace renaming, no matter how good the thing you think you're doing. Doing otherwise is only likely to provoke edit wars, high tensions and many lost hours of everybody work which might have been much better used to improve OSM. Thanks. --mnalis 11:38, 2 August 2012 (BST)

Haitian Creole

I have added this language to support the OSM translation project at Crisis Commons. [1] Andrew 20:09, 14 February 2010 (UTC)

Broken for no further languages

Hi, as some might already noticed, the template became broken due to the very last edits of user:Verdy p. Is anybody able to fix it, please? --!i! This user is member of the wiki team of OSM 09:36, 18 January 2012 (UTC)

This template doesn't work in category namespace?


I tried to replace {{Language-Howto_Map_A}} with {{Languages}} at http://wiki.openstreetmap.org/wiki/Category:Features without any success.

It links to Features, RU:Features (article pages) instead of Category:Features, Category:RU:Features

Can anybody fix it to work with Category: namespace? Thank you! Xxzme (talk) 11:17, 22 July 2014 (UTC)

I tried to add this language bar in Category:Out of date and also wasn't able to (I came here to report this issue).
I added {{Languages|ns=:Category:|Out of date}} and had a partial success, where the English category was correctly linked, the language of the current category was correctly identified, but categories in other languages had a line-break that broke the link. I assume the problem is related to the colon (:) prefix used to link to each category without categorizing the page.
--Jgpacker (talk) 15:03, 30 October 2014 (UTC)
I took a deeper look and was able to isolate the problem. It happens when using Template:LanguageLink with a namespace parameter (ns) that starts with a colon (in this case :Category:). It is related to an old bug in MediaWiki. Since I'm not an expert in MediaWiki templates, I'm asking for help on StackOverflow. --Jgpacker (talk) 16:19, 30 October 2014 (UTC)
Ok, I just made a "quick" change to Template:LanguageLink and Template:LanguageLinkEn and was able to make it work now! Use {{Languages|ns=Category:|Out of date}} without a colon as a prefix (changing "Out of date" to the name of the category in english). --Jgpacker (talk) 19:48, 30 October 2014 (UTC)

Many missing languages

  • BS (minor; wrong, use "Bs:"; template name used the incorrect prefix and has been fixed)
  • ES (template updated)
  • Ge (wrong, use "Ka:")
  • HR (minor; wrong, use "Hr:")
  • Sq (also minor; template name used the incorrect prefix and has been fixed)
  • Zh-tw (no supported as wanted: use "Zh-hant:" instead for Traditional Mandarin; in fact "zh-tw" designates several languages, including Traditional Mandarin, Min Nan...)

Unsupported by templates? But why? Xxzme (talk) 13:09, 10 November 2014 (UTC)

Some templates have different capitalisation from what this template expects to generate links to them, which doesn’t affect their use as templates. Zh-hant is preferred to Zh-tw.--Andrew (talk) 13:24, 10 November 2014 (UTC)
Only 7 language codes are fully capitalized for historic reasons (those that have dedicated namespaces in this wiki: DE, ES, FR, IT, JA, NL, RU; no more will be added, but if this ever occurs, they will not be fully capitalized), all others are lowercased (but the initial only is implicitly capitalized in page titles). — Verdy_p (talk) 03:12, 29 April 2016 (UTC)
Works for me: Sq, ES,
HR, BS also work, however they are minor languages, so due to technical limitations you have to click the "show" link to see them, even if they exist.
It seems Zh-tw isn't widely accepted (see [#Language_addition])
Ge isn't present. I think we could add it as a minor language. Do you know which language is that?
--Jgpacker (talk) 14:19, 10 November 2014 (UTC)
I have no clue about Ge. For some reason it is used in Ka: namespace. I asked question at talk page here: Talk:Ka:Map_Features#Ka vs Ge? Xxzme (talk) 14:52, 10 November 2014 (UTC)
I may be wrong, but it seems it is the Georgian language. There is ka.wikipedia.org, but there isn't a ge.wikipedia.org, so I think KA is the correct language code, and Ge shouldn't be added here. --Jgpacker (talk) 15:22, 10 November 2014 (UTC)
Do we use language code or country code? If language code then, ISO 639-1 is ka but SO 639-2 is geo AND kat... No clear choice for me. Xxzme (talk) 16:11, 10 November 2014 (UTC)
We don't use country codes anywhere for namespace-like prefixes, but only language codes
Country codes may be used for country-specific articles but not in the namespace-like prefix.
Preferably those countries should better be represented by their name...
... except in some OSM keys using country codes, e.g. "Key:FR:school" for schools in France, described in English; these articles will translatable in any language with a prefix (e.g. the article about schools in France is translatable to French as "FR:Key:FR:school" German as "DE:Key:FR:shool"). In such case those country codes prefixing some OSM keys should be fully capitalized, but language codes used for suffixing OSM keys such as "name" should be fully lowercased. — Verdy_p (talk) 03:25, 29 April 2016 (UTC)
The Georgian Map Features was originally created at GE:Map Features with a hand-crafted link from the old {{Language-Map Features}} template. When we changed to using the {{Languages}} template everywhere I moved the Map Features page but not the templates that it uses. The templates aren’t really any use as they are just untranslated snapshots of the English pages at the time it was created. Like Wikipedia we use the two-letter code when there is one.--Andrew (talk) 17:40, 10 November 2014 (UTC)
That page was moved to Ka:Map Features. Note that this wiki documents features in languages independantly of the country where they are used. If a feature is specific to a country, the tags used should use a capitalized country prefix, but the articles about these tags will not use it in the first namespace-like prefix, but always after "Key:" or "Tag:", so there's no possible confusion and these articles remain translatable to more languages. — Verdy_p (talk) 03:25, 29 April 2016 (UTC)

Template doesn't work at El:FAQ

No idea why. Xxzme (talk) 10:54, 2 May 2015 (UTC)

Fixed. --Jgpacker (talk) 20:28, 2 May 2015 (UTC)

Note: "This Template is used on a lot of pages." should be in source code.

The Note: "This Template is used on a lot of pages. ...." should be a part of the templates source code. When clicking somewhere EDIT nobody reads it on this talk page. Please delete this after copying the notice in. --Hb 09:59, 20 May 2015 (UTC)

Proposed rewrite

I have been rewriting this template) fix problems in what we have now. There is a fuller description at User:Wynndale/language test.

  1. The bar makes extensive use of the #ifexist parser function, which is expensive in Mediawiki and limited in the number of times it can be called. Most of the pages in Category:Pages with too many expensive parser function calls are at least exacerbated by the presence of a language bar.
  2. To mitigate the issue above, minority languages are hardcoded into the hidden lower box even when translations exist. Up to now, the only response available for criticism of the banishment [2] has been to adjust the choice of languages tested for display at the top.
  3. The red links are hidden by a script that is only executed when the page has loaded. This is a particular nuisance on mobile devices where it can take up most of the screen.
  4. The list of languages is spread over three locations with an intricate syntax and different ways of entering them depending on the size of their presence in OSM.

Instead of splitting links into upper and lower bars, every link goes together in one sequence, with red links hidden by CSS. A link has been added to “Other languages” (more discoverable than a “show” link) to unhide the links.

I’m interested to know whether you think this is a good idea and how it can be improved. You are welcome to improve it yourselves under less pressure than editing a live template.--Andrew (talk) 08:50, 7 June 2015 (UTC)

Your rewrite seems very sensible and does seem to have drawbacks, so very broad community approval should not be necessary (perhaps post on forum?). One question: Are there any plans to unite the "real" and "virtual" namespaces? What would be the gains, what work would it be?--Jojo4u (talk) 17:36, 20 August 2015 (UTC)

New language template

There is a development version of this template at User:Wynndale/Languages and some pages have been adjusted to use it.

The rewrite is intended not to fill Category:Pages with too many expensive parser function calls, not to permanently hide minority languages out of sight, to hide red links immediately and to be easier to add extra languages and to add the template to a page.

Longer explanation (discuss).

This soft launch is an opportunity to revise the template without as much pressure as working on the live version, however please discuss any major changes.

--Andrew (talk) 10:34, 29 February 2016 (UTC)

New template going live

The new version of the template is now live. It is designed for several objectives including long term maintainability. Please discuss any changes first. There are a number of opportunites for subsequent cleanup, the first is to reindex unreindexed pages, especially ones outside the main namespace, by null edits.--Andrew (talk) 19:24, 21 September 2016 (UTC)

I fixed (again) the LanguageLink tempalte that was again broken (by you), notably it did no longer handle the template namespace (and possibly others). You wanted to simplify it too much;
Now you pretend I'm bullying it, but all this was signaled here since long, and you persist in ignoring the issues, notably in significant spaces, and I don't understnad why you want excessive indentation which is also incorrect in various places, and so does not really help editors, and certainly does not help the server as well (notably if this template is widely used, it should be compacted, we have on this wiki very large pages and ther's no need to add unnecessary junk spaces or newlines , except the minimum (only standard indentation, privided it is done in really safe locations, where they are not significant).
Everywhere we keep just the minimum needed (even for long term: what is necessary is only to have coherent indentation where braces and vbars line up correctly).
You affirmed in your comment that I don't understand the wiki, that's plain false, in fact since long this template was maintained by me before you started to propose something else (but broke it repeatedly in your tests, ignoring all my signaled errors). I've also taken thje performance considerations, and also preserved the compatibility to allow conversion, but you reverted multiple times these needed tweaks. And you don't test things properly unlike what I do (and I commented each one). It's difficult to progress when you constantly ignore every corrections, even when they are signaled and justified (not in my "imagination"). — Verdy_p (talk) 08:55, 22 September 2016 (UTC)
Visibly you have a strange idea of what "maintainability means". It does not mean breaking functionalities and not caring at all about them. You are abusing by not listening any one even when problems were demosntrated and discussed repeatedly. — Verdy_p (talk) 16:37, 22 September 2016 (UTC)

Italian translation

I'm trying to improve the Italian translation. The Category:Pages unavailable in Italian would be a useful tool, but I don't want to overload the server: I've seen this edit war between Verdy_p and Wynndale.
Are there any alternatives to make a list of pages not translated in Italian? My main purpose is to translate the most used tag/key documentation pages. --NonnEmilia (talk) 14:28, 22 March 2017 (UTC)

Those that request it can have it. It has been disabled in some languages, but it can be enabled in Italian if you wish. Just follow the model... — Verdy_p (talk) 14:43, 22 March 2017 (UTC)
I've seen that you already enable it. Thanks. --NonnEmilia (talk) 15:52, 22 March 2017 (UTC)
I did it on request, and the comment is clearly refering to this discussion. — Verdy_p (talk) 18:13, 22 March 2017 (UTC)

Wrong categorisations for missing translations

It looks to me as if the current version of the template also assigns some German pages to Category:Pages unavailable in German. One example would be DE:Feuerwehren in Österreich. A more complicated one is Template:Relation/doc. How can we fix that? --Tigerfell This user is member of the wiki team of OSM (Let's talk) 00:11, 30 October 2018 (UTC)

The first line of the page is {{Languages|Fire stations in Austria}}, which expects a redirect to the German page from DE:Fire stations in Austria. The red link is masked by logic in the template that makes the current language a bold non-link even when the name is different, not relying on Mediawiki. The page may not really need to be maintained in any language other than German and the template is then pointless and can be removed, or you could add a redirect. Perhaps we can get rid of this issue if we move to Wikibase.--Andrew (talk) 09:13, 30 October 2018 (UTC)

Ups, this error was so obvious that I did not see it. But how about Template:Relation/doc? This is an English page and the German page is located at Template:De:Relation/doc. I translated this page yesterday and the German page name was suggested by the template. --Tigerfell This user is member of the wiki team of OSM (Let's talk) 10:06, 30 October 2018 (UTC)

I think I know what is happening but this needs more discussion of what the preferred fix is.--Andrew (talk) 13:24, 2 November 2018 (UTC)
Languages with namespaces known to our Mediawiki installation appear as block capitals (DE:) but can be accessed in lowercase (De: or de:) like other language prefixes. Language prefixes in any other namespace are never known to Mediawiki and have no alternative capitalisations apart from the first letter. Verdy p, who is now permanently blocked from editing here, created large numbers of language-specific categories with capitalised prefixes; as a result, when I rewrote the template to hide red links with CSS instead of #ifexist I special cased categories (only) to have capitalised links. There is no technical reason apart from compatibility with existing page titles to have capitalised links'. Because people were working round breakage to the default linkage from Map Features templates in some languages by reinstating the ns= parameter I rolled everything back to the version I had originally committed, which ignored most of the unsolicited edits Verdy p had made in my namespace but left the capitalised check for missing translations. So, the solution for the remaining loose ends depends on the preferred capitalisation of page titles.--Andrew (talk) 19:24, 12 November 2018 (UTC)