Page MenuHomePhabricator

Languages list based on browser settings
Open, Needs TriagePublic


This request is related to T196536: Detect browser language for not logged in users

On the any Wiki page there is a list of languages given article is translated to. This list can be quite long.

Sometimes Wiki reduces this list into 5-6 languages and adds "More Languages" button. The logic why particular language has been chosen to be shown in the compacted language list is not really obvious.

As a wiki reader, in the compacted languages list I'd like to see only languages I know and understand. I'm not interested in any other languages, as basically I could not read them.

Thus, could you limit that list to languages configured in my browser and sent in the "accept-language" header of the HTTP request?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 12 2020, 5:53 AM
Aklapper closed this task as Declined.Aug 12 2020, 10:01 AM

Hi @Dima_Krakow, thanks for taking the time to report this and welcome to Wikimedia Phabricator!

The software itself supports this via the wgULSLanguageDetection server setting, but on Wikimedia servers this is intentionally not activated.
Quoting from :

// This feature would vastly increase the size of the CDN cache, and increase
// MW appserver load.
$wgULSLanguageDetection = false;

For further technical details how displayed languages are chosen, see

Dima_Krakow added a comment.EditedAug 12 2020, 10:34 AM

Hi @Aklapper,

Thank you for reply and explanation.

Just an idea, there is an navigator.languages Java Script variable. This variable contains list of preferred languages. In my case it is equal to "en-US,en,uk,ru,pl". Wiki can send web page with the list of all known languages for a given article, regardless of user preferences, so CDN can cache it effectively. And in browser on local host with the help of Java Script you can build compacted list that contains only preferred languages.

Does it make sense?

Sorry for being annoying, but the way how Wiki works is really inconvenient. It disappoints a lot. Sometimes I have to go through the long list of languages to find the link to article in language I need.

Kind regards

Dima_Krakow reopened this task as Open.Aug 12 2020, 10:34 AM

ULS already uses browser settings. For more details see:

There are some gadgets on Wikipedia that show only the languages you selected, and not a lot of people use them. A compact list is the better, more flexible
solution for not showing too many languages.


So this functionality is already there.

Is it possible to remove all languages that are not in my browser preferences? I'm not able to read Arabic, Assamese, Silesian, Lithuanian. Those links to other languages just distract my attention while I'm searching for language I need.

For example on Computer wiki page I have following languages.

On Barek Abama I have following languages


Nikerabbit updated the task description. (Show Details)Mon, Oct 12, 2:27 PM