Page MenuHomePhabricator

Language default settings
Closed, ResolvedPublic

Description

Author: dbwiki

Description:
Hi all,

This comes via an OTRS ticket which discussed the issue; those with access can view the ticket at https://secure.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=1883704

Permission was granted to copy the relevant portion of the 10+ email exchange, without any pinfo etc.


Email #1

Wikipedia ignores my first and second prefered languages (en-us, and
en) and selects sweidsh. Even though I can read swedish this is really
annoying, since the swedish database is so much smaller than the
english one. I must set the search language for every search, please
do something about this since Wikipedia is an otherwise really good
site :(

(This problem has arrives in the last week, so maybe you made some
kind of change recently that affected this?)


Email #3

No [I don't use Google Search], I use the site http://www.wikipedia.org, my browser is set to
prefer us-english, english, and as the third choice it is set to
swedish. It will set the default to swedish even though I have set the
preference to english.


Email #5

No, I don't have any account at Wikipedia [replying to whether global account language settings may be the reason why].

I have tried with both Firefox and Internet Explorer. (I never use
Internet Explorer, so it would not have had any stored settings from
Wikipedia that would interfere. I did this after setting the prefered
language of the browser to US-English.) I have also tried to empty all
the caches and cookies from Firefox, but the problem remains.


Email #7

No, I do not like toolbars in the webbrowsers. They tend to pile up
and take too much space, so I do not have the wikipedia search-bar
visible.

I open a new tab in the webbrowser, type in the address
'www.wikipedia.org', and while the page is loading, the search is set
to English, just like I want it to be, but at the instance it finishes
loading, it changes to Swedish (by script I guess), like I do not
want.

As I stated earlier, my default languages in the webbrowser are set to
(in this order): en-us, en, sv, and this is a problem that has arrived
within the last week, without any changes or firefox updates on my
part. (I work with webb-programming myself, so I am quite confident in
my settings, and that I have not updated my browser.)

I must also say that I am quite impressed by your attempts to aid me,
as such help are rare among much too many other
organizations/companies...


Email #10

I have done some research of my own, reading through the scripts on
the page I have problems with. It proved that the problem does lie in
the script of the page http://www.wikipedia.org.

The script gets the language from the DOM-property
window.navigator.language, which is not only non-standard, but does
not actually fetch the preferred language of the user, but the
language that the browser's user-interface uses. Something that causes
trouble for people who want to take advantage of the size of the
English database (like me), or people just using a foreign system.

The solution I would suggest is that the Wikipedia server should use
language negotiation and set the preferred language on the server-side
before sending back the requested start-page. (After which the user
re-selects the language if it is wrong, and the returned
search-results should of course be in the language selected on the
start-page.)

I have solved the problems by reinstalling an English version of
Firefox on my computer (I use Wikipedia daily, so it is worth the
trouble for me), but I think you should pass on this information to
those that implements Wikipedia as it is clearly a bug... Even if they
don't deal with it at once, I think it is good if they know.

...

Thank you for all the time you spent looking into my problem. I am
impressed with the good service.


Regards,

Daniel (posting here on behalf of the above; quoted emails above not mine)


Version: unspecified
Severity: enhancement

Details

Reference
bz15518

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:23 PM
bzimport set Reference to bz15518.
bzimport added a subscriber: Unknown Object (MLST).

dbwiki wrote:

Another email, again with permission to repost received: https://secure.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=1911687&ArticleID=2283017


When I go to http://www.wikipedia.org, the language in the search bar is
automatically set to Swedish. Why is this, and is there anything I can do about it
(Yes, I live in Sweden, no I do not want Swedish to be my default language)? I
created an account and set the account language to English, but that changed nothing.


Regards,

Daniel

Another workaround is to always type "xx:Foo", where "xx" is the language code for the wiki you want (in the reporter's case, "en"), and "Foo" is the search term or page title.

The Meta administrators can't implement language negotiation with the tools currently available ([[m:Www.wikipedia.org template]]). The current language-selecting code obviously isn't that good, but it's all we can do client-side. Can a developer please look into enhancing the portal to support language negotiation?

[[User:Blue-Haired Lawyer]] has implemented JavaScript-based language selection. There's still no HTTP negotiation going on, of course, so the current situation requires JavaScript. Should we consider this bug fixed anyways?

Closing this 2yo bug since, from the last comments, it seems fixed.