Template talk:Other languages
Add topicMain Template:Other languages
[edit]embedded #ifs removed
[edit]It may have looked like a good idea to embed the many #if's used in this template but this was bad:
- this does not remove the need for MediaWiki to evaluate and expand all parameters completely
- the length of the expanded parameters grows exponentially with the depth level
- the embedding depth levels are limited, and this has caused the tempalte to fail when reaching a dozen of languages (error displayed on the Board Elections 2008 pages...)
Testing sucessive #if's is NOT costly:
- it grows linearily instead of exponentially (in terms of total parameters size), and:
- it limits the embedding level to a minimum value.
- it is faster to process.
- it is simpler to edit.
- it does not add to the total size of the template (in fact it is smaller and simpler to read and extend).
- the various conditions of #ifs can be tested individually and are not correlated.
I had made the change when I had already seen the error occuring (too many depths), but someone reverted it without good justification (in fact the justification given were wrong). Verdy P 18:23, 6 June 2008 (UTC)
CSS needs fixing for correct spacing with RTL language
[edit]Note: The CSS rules that generate the separation vertical border is bogous with links using RTL scripts (e.g. Arabic). It needs fixing (and probably the "langfirst" class is not needed, when the separators should be part of the text generated by the template).
For this reason I have restored the separation spaces (without it, the Arabic links are colliding with the separator before the next language listed after it).
Anyway, it is also a bad idea to assume that the CSS will add the necessary spacing that was removed in the template between the listed languages. Logically, there's at least a space separation between all of them.
(note that these standard spaces will collapse automatically into a single one when some language parameters are left empty, so there's no extra spaces at end of the list, just before the [edit] link). Verdy P 18:36, 6 June 2008 (UTC)
Suggest to simplify:
{{#ifeq:{{lc:{{{1}}}}}|en|{{#ifexist:{{{page}}}/en|/en}}|/{{lc:{{{1}}}}}}}
to
{{lc:{{{1}}}}}
It is unnessarily presumed here that the source (or basepage) in any set of multilingual pages would be in English. Even if that is desired, a similar effect can be provided by a redirect from the BASEPAGE to the page in English. Hillgentleman 08:24, 13 December 2007 (UTC)
- This is for backwards compatibility. If English is specified, it first tries to link to an "/en" page if it exists. Only if it doesn't exists, it assumes that the base page is English and links to that. This is because common practice (especially before this template was standardized) is for the source page to be English, with no "/en" page. If the source page is not English, than logically there must be an "/en" page or the input is incorrect.
- Simplifying it as you suggest would break many links. If you're willing to go through pages using this template and standardize all English pages to "/en", then I'd be more than willing to do as you suggest. —{admin} Pathoschild 09:27:55, 13 December 2007 (UTC)
- Thanks. I was wondering how Board elections/2007/Candidates/nl is using 2000+ ifexist calls; I now think it is in Template:Board elections/2007/Candidates and not here. It would be fine if we do not massively duplicate this template call on a page in the future. Otherwise I would consider going through the nx100/k pages and moving the ones that need to be moved. Hillgentleman 09:44, 13 December 2007 (UTC)
- Anyhow it should be a good practice now to keep to /en as the default English link (which can be a redirect). There exist source texts in other languages. Hillgentleman 09:52, 13 December 2007 (UTC)
- "/en" is already the default link. The template only links to the top page if both [a] English is specifically input, and [b] there is no "/en" page. :) —{admin} Pathoschild 10:17:26, 13 December 2007 (UTC)
- It is already so in the template; but it should also be so when we write new articles. Hillgentleman 10:26, 13 December 2007 (UTC)
- "/en" is already the default link. The template only links to the top page if both [a] English is specifically input, and [b] there is no "/en" page. :) —{admin} Pathoschild 10:17:26, 13 December 2007 (UTC)
link to external documents
[edit]Hello. There are some documents about pywikipedia not in meta, but in local language projects. I therefore have made a soft-link at Redirect.py. Can this template link such a external document? Thanks. --Nightshadow28 14:56, 8 June 2008 (UTC)
[edit] points to nonexistant subpage
[edit]When this template is applied to a page Aaa bbb, the [edit] option shows the following link:
In other words, it is kind of "inviting" a newbie to create the page Template:Other_languages/Aaa_bbb. Isn't there anything wrong? What was the purpose of adding this [edit] option to the template? I guess the intention was perhaps to point to
right? Capmo 15:10, 13 April 2009 (UTC)
- Oh, I just saw how the template was applied to Wikinews and now I got the idea: each time this template is used in a page as, say, Abc, we have to create a subpage /Abc under the template's page ("Template:Other languages/Abc") and transclude this subpage in the article Abc and its translations (Abc/pt etc.). This is not clear from the documentation, and the template has been incorrectly used at least once, as in Edit counting for example.
- Why then not use in Meta the mw:Template:Languages from MediaWiki? It's similar in concept, but totally automated (languages don't need to be added manually) and doesn't require the extra step of creating a specific subpage each time. Capmo 15:32, 13 April 2009 (UTC)
Remove link to Image:Geographylogo.png
[edit]{{editprotected}}
Please change
[[Image:Geographylogo.png|20px]]
to
[[Image:Geographylogo.png|20px|link=]]
--Kaganer 11:52, 28 March 2011 (UTC)
More than 60 languages
[edit]Please modify this template, so that it can handle up to 80 languages. Markus Schulze 10:18, 8 June 2011 (UTC)
Proposal to remove uselang parameter
[edit]{{editprotected}}
Hello. I propose to remove "uselang" parameter from the links in this template. With this parameter user can see top menu, sidebar menu and page hooter in specifid language, but I think it has some problems:
- Even if the menus will be displayed in specified language with uselang parameter, pages linked further from the page will not always be displayed with uselang, i.e. the menus will be back to the default language. This must make users confused.
- Similar templates like Template:Meta:Language select/lang do no enforce this without uselang unlike this template. This is also confusing.
- Users originally specifies a favorite language in "My preferences" even if the user occasionally see other language pages. Users like me do not like unexpected and confusing language changes in the menus.
Any objection or opinion, please let me know. --Penn Station 05:37, 7 October 2011 (UTC)
- Seems no objection. I have put {{editprotected}} above to ask sysop to edit.
- Request: removing the "uselang" parameter
- Location: Template:Other languages/link
- Thanks in advance. --Penn Station 08:41, 12 October 2011 (UTC)
- Done. Jafeluv 13:02, 13 October 2011 (UTC)
- Thanks! --Penn Station 13:54, 13 October 2011 (UTC)
- {{editprotected}}
- You broke the main page, please revert last edit until issue is properly discussed and resolved. -- とある白い猫 chi? 04:23, 14 October 2011 (UTC)
- Done. Tiptoety talk 04:37, 14 October 2011 (UTC)
- Thank you! Penn Station so which use of the template is the problem? Can you give an example? -- とある白い猫 chi? 04:43, 14 October 2011 (UTC)
- Done. Tiptoety talk 04:37, 14 October 2011 (UTC)
- Thanks! --Penn Station 13:54, 13 October 2011 (UTC)
- Done. Jafeluv 13:02, 13 October 2011 (UTC)
- The change did not break the main page, but fixed the problem described above. The major problem is that uselang unexpectedly overrides "My preferences" setting. For example, if a user choose "en - English" in "Language:" in "My preferences", the user expects that he/she will always get menus in English, the user's preferred language. Nevertheless, uselang enforces menus in other language. Users click language name on Template:Other languages to see the contents in the language, NOT to see menus in the language because it has already been set in "My preferences".
- Furthermore, it will easily be back (change) to the preferred language - foe exmaple, 1) Set Japanese in "My preferences" as preferred language 2) See メインページ - Both contents and menu are displayed in Japanese. 3) Click "English (en)" on the language menu - Both contents and menu are displayed in English. 3) Click "ミッション" (Mission) on the right-top of the page. - Then the Mission page is displayed. The contents is displayed in English, and the menu is now displayed in Japanese. Antoher example: 1) Set English in "My preferences" as preferred language 2) See Main Page (in English as default) 3) Click "日本語 (ja)" on the language menu - Japanese contents and menus are displayed. 3) Click "最近の更新" (recent change) - Then "Recent changes" screen is displayed in English (contents and menu). -- These examples show frequent and unexpected menu changes are very confusing to users because of inconsistent behavior. Why does the menu need to be changed unexpectedly in spite of "My preferences" setting?
- Also, please see Commons Main Page, MediaWiki Wiki Main Page, Meta:Language select or Mailing lists and choose a language. Menu will always stay in preferred language and won't be changed at all even if the content language is switched. I believe this is expected behavior and should not be different between projects or pages, so uselang should be removed from the Other languages menu. I hope you'll revert your edit. --Penn Station 10:38, 14 October 2011 (UTC)
- Let me show another example. If the preferred language is English: At the main page (English), if a user click "日本語 (ja)" then the メインページ page is displayed with the menu in Japanese. However, if the user click a link to the メインページ page at, for instance, Recent Change, Watchlist, or History, or any page without Template:Other_languages, the page is displayed with the menu in English! Very confusing. --Penn Station 05:21, 15 October 2011 (UTC)
- I was unable to navigate to rtl pages as well as several others so it did break links. If the parameter needs to be removed, I want to fully test the change in the code before applying it.
- You are under the assumption that visitors coming to meta know how to set preferences or even have this option (IPs don't have prefs). Unlike commons meta is not a content project so different circumstances apply. People come here to discuss stuff like creating new languages, disputes of various sorts, information about how to use wikimedia for research purposes, etc. It is confusing to have English links littered around a foreign language - particularly rtl languages - and the idea behind the current structure is to prevent it.
- I understand what you are saying and it is inconvenient to me as well that the links are in a foreign language despite my settings. I however do not think it is a good idea to make the changes you mentioned until the issues I mentioned are addressed.
- -- とある白い猫 chi? 05:36, 15 October 2011 (UTC)
- One solution is to "force" the option to IPs only but I do not know how to distinguish logged in users from anonymous ones. -- とある白い猫 chi? 05:45, 15 October 2011 (UTC)
Incorrect categorization
[edit]{{editprotected}} With using for multilanguage templates (as example, see Template:Main Page/Sisterprojects/en), they included in the category Category:Other languages templates. My point, what this incorrect. --Kaganer 10:59, 8 November 2011 (UTC)
- Any points about this? Please fix it! --Kaganer 15:35, 25 January 2012 (UTC)
- This problem remains unsolved :-( --Kaganer (talk) 13:35, 4 January 2013 (UTC)
- So fix it. -- YPNYPN ✡ 04:20, 11 January 2013 (UTC)
- It's not clear what you want to be changed. Is it working now? πr2 (t • c) 15:32, 19 January 2013 (UTC)
- Template:Main Page/Sisterprojects/en (#1) includes {{Other languages/Template:Main Page/Sisterprojects}} (#2). Template #2 is "Other languages template", and it is included into Category:Other languages templates. Template #1 is not "Other languages template", but it is also included into Category:Other languages templates. In my opinion, code
{{#switch:{{NAMESPACE}}|Template=[[Category:Other languages templates|{{{page|{{SUBPAGENAME}}}}}]]}}
- should be replaced to
{{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1}}|Template:Other languages|[[Category:Other languages templates|{{{page|{{SUBPAGENAME}}}}}]]}}
Done. --MF-W 13:22, 20 January 2013 (UTC)
More than 80 languages
[edit]{{editprotected}}
Please modify this template, so that it can handle up to 100 languages. --Kaganer (talk) 13:42, 4 January 2013 (UTC)
- Basically replace this page with the contents of User:PiRSquared17/Sandbox5. πr2 (t • c) 15:35, 19 January 2013 (UTC)
- Done. --MF-W 01:01, 20 January 2013 (UTC)
Add ckb into "rtl" section
[edit]{{editprotected}} Please add "ckb" language into "rtl" section of Template:Other languages/link. --Kaganer (talk) 16:28, 4 January 2013 (UTC)
- In fact, it would be better to have all these:
- ar
- arc
- arz
- dv
- fa
- glk
- he
- lad
- mzn
- pnb
- ps
- sd
- ug
- ur
- yi
- πr2 (t • c) 15:20, 19 January 2013 (UTC)
ckb added. The others as well, where they were not yet included --MF-W 01:03, 20 January 2013 (UTC)