Template talk:LangSwitch

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Info non-talk.svg Template:LangSwitch has been protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit.
Please test any changes in the template's /sandbox or /testcases subpages, or in a user subpage, and consider discussing changes at the talk page before implementing them.

feature request[edit]

I would like to add Category:Internationalization templates using LangSwitch to this template to make it easier to locate templates using it that might need translations.

<includeonly>{{ #ifeq:{{NAMESPACE}}|Template|[[Category:Internationalization templates using LangSwitch|{{PAGENAME}}]] }}</includeonly>

--Jarekt (talk) 14:15, 21 August 2009 (UTC)

 Not done, as much as I like this idea, this won't work, as some templates are transcluded on template pages ({{In category}} for example) and this would add all transclusions of {{In category}} to the cat as well. --The Evil IP address (talk) 16:18, 21 August 2009 (UTC)
you are right. Is there any way to just get the first transclusions? --Jarekt (talk) 18:54, 21 August 2009 (UTC)

Flag-like symbols[edit]

The template seems to introduce flag-like symbols to designate languages. It is a prettification, but it does not really help users; languages are not directly related to state borders. Better to remove. /Pieter Kuiper (talk) 09:48, 7 January 2010 (UTC)

I do not believe this template adds any symbols or text - it is just specialized switch statement. However other templates using this one might be doing it. Could you give some examples? --Jarekt (talk) 16:54, 7 January 2010 (UTC)
I created LangSwitch and I invested hundreds of edits in removing flags as language indicators from Commons galleries too. I certainly wouldn't use flags to indicate languages anywhere ;-) Whenever you see flags used this way, please remove them. --Slomox (talk) 17:24, 7 January 2010 (UTC)
Sorry, I was wrong. I had seen them in File:West Bank Barrier cartoon by Latuff.png, but on closer reading, the flags are added by {{LanguageSelector}}, and they can be switched off. I will take the issue there. /Pieter Kuiper (talk) 17:32, 7 January 2010 (UTC)

default parameter[edit]

I would like to add an optional "default" parameter in case default is not English. I was thinking about changing last 2 lines to:


Does anybody see any problems with that solution? --Jarekt (talk) 18:54, 3 June 2010 (UTC)

The solution is fine, but at the moment I don't see for what purpose we would need a default. Could you give some examples where this is needed? --Slomox (talk) 19:01, 3 June 2010 (UTC)
I run into this problem few times before, but at the moment I was thinking about creating {{dash}}, to comply with request at Template talk:Creator/layout to fix up the "dash". The template would produce long dash for English and short dash for everybody else. I could write it using {{#switch ...}}, but {{LangSwitch}} seemed like a better option. --Jarekt (talk) 19:07, 3 June 2010 (UTC)
But if anything else around the dash defaults to English, the dash should also default to English. If {{Creator}} is completely unlocalized for e.g. Kapampangan, everything will appear in English. Except for the dash. That would be a bit inconsistent. --Slomox (talk) 19:43, 3 June 2010 (UTC)
May be a cleaner option would be to modify all Template:Creator/lang templates to add a dash parameter to be passed to the Template:Creator/layout. --Jarekt (talk) 19:53, 3 June 2010 (UTC)
Just, if an example can be useful : here we get "commissioned by John, duke of Burgundy, with John duke of Burgundy in any language that has not been langswitched. But John wasn't English, a French or Dutch title would seems more logical for a Spanish user.--Zolo (talk) 22:02, 11 July 2010 (UTC)

If it is not too complex to implement, I think it could be convenient to be able to choose a default language different from English. For example, if you use Catalan in File:Brooklyn_Museum_-_"Pauvre_Giulay...."_-_Honoré_Daumier.jpg, you will get: depicted person (well "Persones retratades") Franz Joseph I of Austria. It looks a bit silly to have an English name for an Austrian Emperor, so it would be nice to have something like Franz Joseph I by default. Granted these are rather trifling things and it could be fixed by, say, a "Franz Joseph I" multilingual template. But since this kind of cases occur quite often, it could be nice to have a choice for the default language.--Zolo (talk) 10:14, 5 October 2010 (UTC)

I think replacing the "en" at the beginning (the last thing in the series of #if:s) with {{{default|en}}} or, as Slomox likes to do, {{#if:{{{default|}}}|{{{default}}}|en}} would be the best way (so empty == undefined). Rocket000 (talk) 18:20, 5 October 2010 (UTC)

I saw that a default parameter has been created. Is it intenetional that English takes precedence over it ? I mean: when my preferences are set to French and I write {{langSwitch|en=english|default=default}} I get "english".--Zolo (talk) 08:14, 20 October 2010 (UTC)
That is some strange behavior of {{GetFallback}} / {{GetFallback2}}. I will look into it. --Jarekt (talk) 15:32, 20 October 2010 (UTC)

Multiple languages[edit]

Sometimes, the object on the image has a title/name in one language, it would seem good to have both the original language and the user's language. For example, it seems simpler to state that we want French on the first line rather than adding French for each language in :
{{LangSwitch |de='''''La Liberté guidant le peuple'''''</br>''Die Freiheit führt das Volk''.
|en='''''La Liberté guidant le peuple'''''</br>''Liberty Leading the People''.
|es='''''La Liberté guidant le peuple'''''</br>''La libertad guiando al pueblo''.
|fr='''''La Liberté guidant le peuple'''''.
|ru='''''La Liberté guidant le peuple'''''</br>''Свобода, ведущая народ''.
|vi='''''La Liberté guidant le peuple'''''</br>''[[:vi:Nữ thần Tự do dẫn dắt nhân dân|Nữ thần Tự do dẫn dắt nhân dân]]'' }} ([1])

As I understand it, it can't be done with the current template, is there a way to do that ?--Zolo (talk) 08:18, 11 July 2010 (UTC)

You can try using {{mld}} for that kind of purpose. Esby (talk) 12:12, 11 July 2010 (UTC)
Actually I don't want a box like in mld, I just want the same thing as what is on File:Eugène_Delacroix_-_La_liberté_guidant_le_peuple-2.jpg, but I just wish it required a bit less of text
What's wrong with writing it outside the template?:
La Liberté guidant le peuple
Liberty Leading the People.
--Slomox (talk) 21:25, 11 July 2010 (UTC)
That means we should put fr=(blank or spaces) but when we do that, it acts as if there was nothing in French, so, when the default language is French, we get the only title below, and that looks a bit strange. Not a very serious problem, admittedly, but if we can fix that, that would probably be better.--Zolo (talk) 21:54, 11 July 2010 (UTC)
How do you want it to behave? --Slomox (talk) 22:11, 11 July 2010 (UTC)
I'd like not to have the title in English when I use commons in French.--Zolo (talk) 08:03, 12 July 2010 (UTC)
User:Esby/test5 ? Esby (talk) 09:36, 12 July 2010 (UTC)
That seems good, thanks, I'll put it without the , I think that it looks a bit better and that it is the way it's usually done by museums.--Zolo (talk) 10:52, 12 July 2010 (UTC)
The fr tag is here for accessibility, it purpose is here to indicate how the automatic reader should pronounce the word, depending the language... Esby (talk) 10:59, 12 July 2010 (UTC)
Okay. Since it is meant for non-French speaker, is there a way we can indicate French in English, französisch in German and so on rather than "français"?
Ah maybe I can put something like ({{language|fr}})--Zolo (talk) 11:17, 12 July 2010 (UTC)
I guess the best solution would be : User:Zolo/test, but it requires quite a lot of writing. If it's not too long to create a template that can do this thing, I think it would be the best solution, but I don't know how to do it.--Zolo (talk) 11:42, 12 July 2010 (UTC)

By the way, I really don't think this template should be used for substantial text describing the content of an individual image, since it makes it very difficult to scan down and check that translations are correct, etc. Why not just plain {{fr|1=''La Liberté guidant le peuple''}} {{de|1=''Die Freiheit führt das Volk''.}} {{en|1=''Liberty Leading the People''}} etc. etc.? All the other solutions go to a lot of work to produce results that some people will find annoying... AnonMoos (talk) 07:57, 6 April 2011 (UTC)

For a substantial text, maybe not but a title is not very long. For Liberty leading the people, we could have 25 languages just by using interwikis, if you add a test in 10 languages in the description parameter, and all languages are displayed this will look quite ugly. Sometimes a javascript displays only the user's language but this hides the original language which is precisely what I wanted to avoid here. I have created a {{title}}, it is easier to use than multiple langSwitch, so maybe it can help in such cases.--Zolo (talk) 10:08, 6 April 2011 (UTC)

I usually do this with the title-template.
{{title|1=La Liberté guidant le peuple|lang=fr|de=Die Freiheit führt das Volk|en=Liberty Leading the People}}
will give:
French: La Liberté guidant le peuple
Liberty Leading the People
It shows the original language and the users selected language. No others though. DutchHoratius (talk) 10:08, 1 June 2012 (UTC)

Category:LangSwitch template without English version[edit]

I added a maintenance category Category:LangSwitch template without English version, to catch one form of misuse of this template. Seems like innocent edits like: this break perfectly fine templates. --Jarekt (talk) 18:03, 5 October 2010 (UTC)

Good idea. I recently noticed that too and was thinking of creating a new specialized langSwitch, but didn't want to create yet another autotrans thing. Rocket000 (talk) 18:15, 5 October 2010 (UTC)
What exactly is wrong with such use of the template? I've been using it on category pages, where a category is mentioned by its English name, to provide translations in other languages to be displayed in case uselang is equal to that language. Why did it stop working with {{See also}}? --AVRS (talk) 19:39, 8 October 2010 (UTC)
When a user views a template that lacks a translation in the language of their interface (and in the possible fallback languages), it falls back to English. If there is no English translation, it doesn't display anything even if many other translations exist. What's wrong with {{see also}}? That doesn't use this template, btw. Rocket000 (talk) 07:56, 9 October 2010 (UTC)
I mean use like this:
{{See also|Category:Water|:Category:Water {{LangSwitch|eo=(Akvo)}}}}, which gives:
--AVRS (talk) 15:44, 9 October 2010 (UTC)
Ah, I see what you're doing. Since there's no en version, this template is now inserting a category inside the link you are trying to make. It looks like this:
[[:Category:Water|Category:Water [[Category:LangSwitch template without English version]]]]
Which breaks the link. To solve this we can add a way of suppressing the category completely such as adding a {{{category}}} or {{{nocat}}} parameter. Rocket000 (talk) 03:37, 10 October 2010 (UTC)
Actually, I suggest removing it. It breaks a lot of stuff. Rocket000 (talk) 03:42, 10 October 2010 (UTC)
Well it has some usefulness, now it should probably be rewritten. Esby (talk) 06:11, 10 October 2010 (UTC)
Ok, and I forgot Jarekt's edit summary saying this is to be a permanent category. I guess we have to go the category parameter way. Which method would you prefer? I personally like the simple override {{{category|...}}} so all you do is |category= but setting empty values isn't the clearest way. Maybe {{#if:{{{nocat|}}}||...}}? Rocket000 (talk) 10:15, 10 October 2010 (UTC)
I intended it as a permanent category but if it breaks things than we can disable it and try again latter. I still think we should add #default option which could be other than {{{eng}}} and may be allow wider range of defaults if English is not provided. What I do not like about present version is no text in any language if English is not present. Also at the moment I excluded files, too phase it in more gradually but they should be included as well. --Jarekt (talk) 18:03, 10 October 2010 (UTC)

Any reason to use both




? If I understood correctly, if the "en" is present, it will be used in the first case, and never in the #default case.

Proposed new version of the template[edit]

Current version of the template does not use "default" option in a correct way, see Template_talk:LangSwitch#default_parameter, and there do not seem to be any easy fixes to this issue other than modifying {{GetFallback}} / {{GetFallback2}}. As a result I rewrote the template without use of {{GetFallback}} templates, making it in the process much shorter and (hopefully) easier to read and maintain. The new version can be found at {{LangSwitch/test}}. I also wrote for testing purposes User:Jarekt/e which tests various options of old and new versions. --Jarekt (talk) 15:46, 22 October 2010 (UTC)

{{LangSwitch|en=fail|default=yep}}: fail (except your interface is set to English).
Did my edits work? Looks good. Have to check other languages. --Slomox (talk) 21:57, 22 October 2010 (UTC)
Works. --Slomox (talk) 21:59, 22 October 2010 (UTC)


Was just re-thinking this template: Is the code at User:Slomox/test18 a brilliant simplification of the template or a moronic brain-wreck?

{{User:Slomox/test18|default=default}}: User:Slomox/test18
{{User:Slomox/test18|en=en}}: User:Slomox/test18
{{User:Slomox/test18|de=de}}: User:Slomox/test18
{{User:Slomox/test18|es=es}}: User:Slomox/test18
{{User:Slomox/test18|en=en|default=default}}: User:Slomox/test18
{{User:Slomox/test18|de=de|en=en|default=default}}: User:Slomox/test18
{{User:Slomox/test18|blp=blp|lang=blp}}: User:Slomox/test18
{{LangSwitch|blp=blp|lang=blp}}: LangSwitch Error: no default --Slomox (talk) 22:09, 22 October 2010 (UTC)
I like this one - it is so much more compact. I added it to [[User:Jarekt/e]] test set and it seems to work exactly as current {{LangSwitch}}. The only difference with what I was trying to do in {{LangSwitch/test}} is the treatment of empty fields like "fr=" in {{LangSwitch/test|en=English|fr=|lang=fr}} gives "Template:LangSwitch/test" instead of "English". --Jarekt (talk) 03:04, 23 October 2010 (UTC)
Also is there any reason for not replacing each one of 6 "{{#if: {{{lang|}}} |{{{lang}}}|{{int:Lang}}}}" with "{{{lang|{{int:Lang}}}}}". It is shorter and more clear. --Jarekt (talk) 03:07, 23 October 2010 (UTC)
The two constructions work differently in the case that the parameter "lang" is set, but set to the empty string. If I call "{{LangSwitch|lang=}}" then "{{#if: {{{lang|}}} |{{{lang}}}|{{int:Lang}}}}" will return the value of int:Lang, while "{{{lang|{{int:Lang}}}}}" will return the empty string "". --Slomox (talk) 10:43, 23 October 2010 (UTC)
And the reason why returning the empty string is a bad thing™ is that you may want to use something like "{{LangSwitch|lang={{{lang|}}}}}". If {{{lang|}}} is empty that will lead to "{{LangSwitch|lang=}}" and int:Lang is never called. --Slomox (talk) 11:16, 23 October 2010 (UTC)
The code looks good - but I am not extremely competent to decide. Also, it is probably good that the language list is automatically upadted through getfallback. But I like {{LangSwitch/test|en=English|fr=|lang=fr}} --Zolo (talk) 06:48, 23 October 2010 (UTC)
{{LangSwitch/test|en=English|fr=|lang=fr}} returns nothing because of the issue discussed above. It's a very problematic thing. If you want to have the template return nothing you should use {{LangSwitch|en=English|fr=<nowiki/>|lang=fr}}. That works and is much less problamtic than the empty string. --Slomox (talk) 11:16, 23 October 2010 (UTC)
My intention was for {{LangSwitch/test|en=English|fr=|lang=fr}} and {{LangSwitch/test|en=English|lang=fr}} to have different behavior. The first one where you explicitly say to return nothing for french language and second one where I would expect to see default/en. The {{LangSwitch|en=English|fr=<nowiki/>|lang=fr}} syntax might be to esoteric for most users. Also it seems unfair that you can ask for no english as in {{LangSwitch|en=|fr=French}} but you can not ask for no French. --Jarekt (talk) 16:43, 23 October 2010 (UTC)

Change language through mld[edit]

Just wondering: it is somewhat frustrating that when we choose another language with {{mld}}, langSwitch texts do not change language. I guess that for non-registered users - who have English by default - it is barely understandable. Would it be possible to make the langSwitch text change when another language is selected through mld ?--Zolo (talk) 06:48, 23 October 2010 (UTC)

Would it be possible to make the langSwitch text change when another language is selected through mld ? Yes. By replacing LangSwitch with MLD.
LangSwitch and MLD have two different approaches. LangSwitch selects the right language server-side and delivers only this language to the client, while MLD delivers all languages to the client and the right language is selected client-side. These two approaches are mutually exclusive. You cannot integrate LangSwitch with MLD without rendering LangSwitch obsolete.
From a strictly rational point of view we should decide for one of the two solutions and completely disable the other. It's a bit like Blu-ray vs. HD DVD. They both do their job, but there's still no point in supporting both. From the point of view of the end-user it only has disadvantages to have two incompatible formats. But they were both developed and compete(d) against each other. --Slomox (talk) 11:01, 23 October 2010 (UTC)
There was a curious case with File:Freedom of Panorama in Europe NC.svg, which used LangSwitch inside mld — I had it removed, because of the discussion here. This is relevant, because the trouble with LangSwitch is that it's impossible to switch languages with it, and the issue with mld is that unless it only contains text, it requires more code, especially with longer image descriptions. The ideal would be this:
|en=Text in English
|it=Text in Italian}}
|en=OK, including works of art
|it=OK, incluse opere d'arte}}
— In which the default language could be English (if it's not provided, then a fallback language) or a user's default language when logged in, or based on geography; and if I change the language, text both under mld and LangSwitch would change to the desired language.
-Mardus (talk) 06:39, 11 April 2012 (UTC)

Please understand that {{LangSwitch}} is a server-side implementation and does not require JavaScript while {{Mld}} depends on MediaWiki:Multilingual description.js. You can't load other languages of LangSwitch, except using an XHR or CSS (to hide them by default). -- RE rillke questions? 17:41, 11 April 2012 (UTC)

Proposed new version of the template (part 2)[edit]

I rewrote proposed new version of {{LangSwitch}} again and new version can be found at {{LangSwitch/test}}. I started with User:Slomox/test18 which has identical output while being much smaller and simpler than the current version of {{LangSwitch}}, and did following changes:

  • Reformatted for easier reading
  • Use special character "~" to indicate desire for some languages not to be displayed, so {{LangSwitch|en=English|fr=~|lang=fr}} will return "Template:LangSwitch/test". Current version of the template does not allow empty returns if English or default are provided.

Much more testing of the current and new template can be found at User:Jarekt/e. Please add to it if other examples are needed. --Jarekt (talk) 19:29, 29 October 2010 (UTC)

Looks fine to me, thanks.--Zolo (talk) 20:21, 29 October 2010 (UTC)
Currently in both versions of the template, "lang" overrides both "default" and the user's locale. Isn't it supposed to just set "default" to the value specified for the language specified with "lang"? --AVRS (talk) 14:33, 30 October 2010 (UTC)
Default language is always English. Parameter "default" is for the default message which could be more language neutral. One use would be for templates which add links to wikipedia articles in different languages, where default can be commons gallery page. --Jarekt (talk) 03:23, 31 October 2010 (UTC)
And what is the parameter "lang" for? --AVRS (talk) 15:57, 31 October 2010 (UTC)
I hoped to use "lang" to make {{User Firefox}} use translations even for users who have specified a language for the template when it was not autotranslated. That way, it would be possible to make such info default to the owner's language instead of English. --AVRS (talk) 16:18, 31 October 2010 (UTC)

✓ Done I uploaded the new version. --Jarekt (talk) 01:01, 2 November 2010 (UTC)

bugs ?[edit]

Isn't {{langSwitch|en=english|ca|es=catalan or spanish|lang=ca}} supposed to give "catalan or spanish" both because of the |ca|es and the fallback ?--Zolo (talk) 20:10, 20 January 2011 (UTC)

{{LangSwitch}} is has similar syntax to {{#switch: }} but not the same, since one is a template and the other one a ParserFunction. This is one of the differences. In above case "ca" is interpreted in the template as {{{2}}}=ca not as {{{ca}}}. Other difference is "default" vs. "#default". --Jarekt (talk) 21:47, 20 January 2011 (UTC)
Oh yes sorry. It would be convenient if we were able to have |ca|es (for example in {{size/test2}}, but I suppose there is no way to do that.--Zolo (talk) 08:03, 21 January 2011 (UTC)

langSwitch vithout English[edit]

Should the template categorize in langSwitch without English even when there is a "default". Cases like {{conj}} with {{langSwitch|zh=|default=&#32}} certainly cram the category but it may be better to write out "en" in any case.--Zolo (talk) 08:13, 8 March 2011 (UTC)

I changed the template so langSwitch with default but without "en" will not be categorized. I also added "nocat" parameter. Set it to "1" and category should disappear. --Jarekt (talk) 02:18, 9 March 2011 (UTC)


Hi, why this template don't care about {{SUBPAGENAME}}? in this cases there is an alternative for it? my ideaebraminiotalk 19:09, 9 March 2011 (UTC)

Can you provide examples of the situations where use of {{SUBPAGENAME}} would be useful? --Jarekt (talk) 20:34, 9 March 2011 (UTC)
Template:PD-USGov-USDA-ARS/fa -> Template:In category.−ebraminiotalk 01:44, 10 March 2011 (UTC)
I am still confused about how you would like to use it, but maybe {{LangSwitch|lang={{SUBPAGENAME}}|en=......|fa=....}} would work. --Jarekt (talk) 13:02, 6 April 2011 (UTC)
Oh, I just wanted "This template will categorize into..." message, be on Persian on this page. May I thinking wrong... −ebraminiotalk 17:28, 26 July 2011 (UTC)
If your language is set to fa than you should see {{In category}} in Persian. If you want to see it in Persian even if your language is set to other language than use {{In category|........|lang=fa}}. However you should not have additional documentation (like calls to {{In category}}) in language subpages like {{PD-USGov-USDA-ARS/fa}}. All that should be on {{PD-USGov-USDA-ARS}}. --Jarekt (talk) 19:14, 26 July 2011 (UTC)

bug with RTL languages[edit]

In Tibor Sekelj I put a summary in 24 languages. SwitchLanguages work fines with all languages but the two RTL-languages (he and yi).

  • when selecting any language, the text is shown in this language and in the RTL languages
  • when selecting one of this two ones, all languages are shown but the selected.
  • Selecting all languages, it is fine.

--Arno Lagrange 10:15, 29 August 2011 (UTC)

Bug, but I think wrong template. MediaWiki:Multilingual_description.js is maybe the right one. -- RE rillke questions? 12:38, 29 August 2011 (UTC)
No bug. They were just in a new table field. The script cannot guess what belongs to one description. I removed the new field and it works now. -- RE rillke questions? 13:02, 29 August 2011 (UTC)

no default[edit]

{{editrequest}} If there is no default only the template that bears that template should be added to the category "LangSwitch template without English version" not all pages carrying that template. But I don't know if that's possible. --Cwbm (commons) (talk) 11:50, 18 August 2012 (UTC)

I know it is a problem but as far as I know there is no way to fix it. --Jarekt (talk) 11:45, 25 October 2012 (UTC)


LangSwitch has the following prerequisites:

  1. Template:GetFallback
  2. Template:GetFallback2
  3. Extension:ParserFunctions
  4. Language codes set up in Lang, e.g. Mediawiki:Lang, Mediawiki:Lang/ru, Mediawiki:Lang/lv (is there a better solution for this?)

P.S. I suggest including this on LangSwitch documentation. DavisNT (talk) 22:59, 7 August 2013 (UTC)

Current documentation says "Relies on: {{GetFallback}}, {{GetFallback2}}". As for Parser Functions and Mediawiki:Lang, almost all commons templates depend on those. I do not see a need to add them. --Jarekt (talk) 03:40, 8 August 2013 (UTC)
I guess DavisNT tried porting this template to some private wikis or test wikis. I am not aware of a variable returning the user langue but you may ask someone from the i18n-team in #mediawiki webchat or #mediawiki-i18n webchat. -- Rillke(q?) 10:28, 27 September 2013 (UTC)

Recommend for uses outside the Template namespace?[edit]

Multiple documentation pages (including the /doc page of Template:LangSwitch itself) suggest that LangSwitch should only be used in the Template namespace. Is there any practical reason for this limitation? I would prefer LangSwitch over Mld (and even more over the simple 2-letter language templates) for galleries and for file description pages, too. Any reason why I shouldn't use it there? Thanks --Reinhard Müller (talk) 15:47, 26 September 2013 (UTC)

I think this template is used in all the namespaces, so writing in documentation that it should be only used in template namespace is a little pointless. However some people go overboard with {{LangSwitch}} templates, having different descriptions for each language or translating every field of {{Artwork}} template. So in most cases LangSwitch should be used in template namespace. I am not a big fan of Mld, and try to avoid it, but than I just use {{en}}, {{de}}, etc. and keep multiple translations of the descriptions. --Jarekt (talk) 16:47, 26 September 2013 (UTC)

New version[edit]

I have created a new Lua version at Template:LangSwitch/sandbox. It is necessary if we want to make langSwitch like function in module and it has several other benefits (more at Template talk:Fallback. From what I can see it works the same as the current version, save for a slightly different error handling, but error reports are welcome. If no one objects, I will replace the main template in a few days. --Zolo (talk) 16:36, 21 November 2013 (UTC)

Edit request: Heavily used template[edit]

{{Edit request}} Please add <noinclude>{{heavily used template}}</noinclude> to the top of this high use template (example). Riley Huntley (talk) 08:49, 30 April 2016 (UTC)

✓ Done--Jarekt (talk) 13:18, 2 May 2016 (UTC)

Langswitch considered harmful (when used beyond its intended purpose)[edit]

The "langswitch" template element was really originally intended for software interface messages (the underlying Wikimedia software telling you that some kind of error has occurred in a language that you'll understand, etc). Unfortunately, some people seem to want to extend langswitch to uses for which it was not designed, and to which it is not suited -- i.e. managing various types of general-purpose multilingual descriptions (of images, etc). In such cases, if you want to check if the translations between the different languages are correct, or see file descriptions in a language different from your browser interface language, then langswitch does nothing for you. The rigid inflexible simplistic "langswitch" approach is simply not capable of handling the various diverse situations and needs which arise in the context of multilingual image etc. descriptions, and should not generally be used for such purposes (as has been discussed previously at various times on the "Village pump". etc). AnonMoos (talk) 16:11, 30 October 2016 (UTC)

Using default with en[edit]

Is the following example from the documentation correct?


The above displays as Warsaw

Examples which show this section:

It seems that all languages fall back to en, so en will always be used if it is present. That means default has no effect when en is specified. Johnuniq (talk) 06:10, 15 September 2017 (UTC)

Yes "default" is only going to be used if there is no "en" option, so int the above example "default" will never be used. --Jarekt (talk) 18:24, 15 September 2017 (UTC)
Maybe I will change the documentation to present "default" as alternative argument name to "en". It is only useful if your default text is not English and you do not want to call it English. --Jarekt (talk) 18:42, 15 September 2017 (UTC)