Extension talk:UniversalLanguageSelector

Jump to navigation Jump to search

About this board

Any way to remove the poput a user gets when language is changed by link?

1 (talkcontribs)

You can change the language of an user by putting a &setlang=languagecode at the end of the URL. Then a small window pops up, asking the User if he want to change his language. Is their a way to remove that popup-window like in older Versions?

Reply to "Any way to remove the poput a user gets when language is changed by link?"
Inductiveload (talkcontribs)

The instructions say to use compile.php, but it seems not to exist. Is that instruction out of date?

Amire80 (talkcontribs)

Do you mean compile-font-repo.php?

Inductiveload (talkcontribs)
Reply to "compile.php still needed?"

Get data from ULS to template or module

1 (talkcontribs)

How to get data (list of user’s languages in order of preference) from ULS to template

Reply to "Get data from ULS to template or module"

Hebrew messes up site layout

Summary by Vishkujo

Added a lot of /* @noflip */ to css

Vishkujo (talkcontribs)

Having hebrew set as the language on my website causes the sidebar and infoboxes to flip to the opposite side, messing up how the pages look. https://jojowiki.com

The side bar also covers my top menu. Any way to prevent the elements from flipping positions?

Amire80 (talkcontribs)

It's not an issue with the Universal Language Selector. The ULS is a selector—it only helps users select the language they want.

It's an issue with the skin on your site. Hebrew, Arabic, Persian, and other languages that are written from right to left (RTL) are supposed to have the sidebar and many other elements on the other side. The Vector skin is adapted to this well.

To adapt your skin, you'll have to tweak the CSS yourself. The page Directionality support can help you.

Detect wich language is used?

1 (talkcontribs)

Is there a way to detect which language is currently used on a page on that page?

For example:

I have a page with "{{#langage}}" written on it.

If a user visits that page it says for example "Eng" if he is using English or "Ger" if he is using german.

Is there a way to archieve that?

Reply to "Detect wich language is used?"
Lwangaman (talkcontribs)

When downloading the extension for Mediawiki 1.34 I get this error while tar unpacking: gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now

Jdforrester (WMF) (talkcontribs)
Lwangaman (talkcontribs)

Am following the Download link on the right hand side of the page which leads here: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/UniversalLanguageSelector And selecting version 1.34 the downloaded file has that same name, yes. It's being downloaded onto my Windows system, from there I am uploading it to my Ubuntu server and then unpacking it. Haven't had any problems with any other extensions up until now... Well, I just tried again for the third time, and this time it worked, that's strange. I guess we can say this isn't an issue?

Jdforrester (WMF) (talkcontribs)

It's possible that the file was corrupted when you uploaded it via FTP (or whatever).

How to add a new suggested language

7 (talkcontribs)

For the ease of users, I want to add Urdu (a language spoken in India and Pakistan) in the suggested languages list by default. How can I achieve it?

Amire80 (talkcontribs)

Where exactly do you want it to appear, and for whom?

If it's for yourself, simply clicking it once will make the software remember it and show it as suggested. (talkcontribs)

Thank you for your reply, I want to add it for virtual keyboard that appears in search box and for all users.

Amire80 (talkcontribs)

There already is a virtual keyboard for Urdu there. Click on the "..." at the bottom of the list, and search for Urdu. Once you do it once, it will appear as one of the first languages in the list.

On the Urdu Wikipedia it is already the first suggested language. (talkcontribs)

I can see that. My question is "how we can add a suggested language". For example, English is appearing their by default. So by default I want to add Urdu, Arabic, and English. It will ease users to "Click on the "..." at the bottom of the list" stuff. Thank you

Amire80 (talkcontribs)

English appears by default on English sites, Urdu appears by default on Urdu sites. Other languages appears on other sites. ULS also adapts itself to each user. (talkcontribs)

So there is no way to force ULS to add multiple default languages.

Reply to "How to add a new suggested language"

$wgULSGeoService and http://freegeoip.net/shutdown

Spas.Z.Spasov (talkcontribs)

Recently Chrome browser starts to show me a message for mixed content (HTTP/HTTPS) when I open my private wiki. I've used the inspector and found this error message:

Mixed Content: The page at 'https://my.wiki.com/index.php/Home' was loaded over HTTPS, 
but requested an insecure script 'http://freegeoip.net/shutdown'. 
This request has been blocked; the content must be served over HTTPS.

On http://freegeoip.net/shutdown I found this message:


This API endpoint is deprecated and has now been shut down. To keep using the freegeoip API, please update your integration
to use the new ipstack API endpoint, designed as a simple drop-in replacement.
You will be required to create an account at https://ipstack.com and obtain an API access key.

For more information on how to upgrade please visit our Github Tutorial at: https://github.com/apilayer/freegeoip#readme

So, according to the information placed on https://freegeoip.app/, my question is: Is it correct to set the relevant variable in the following way?

$wgULSGeoService = 'https://freegeoip.app/json/';
Deletedaccount4567435 (talkcontribs)

On line 305 of https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector/blob/master/UniversalLanguageSelector.hooks.php, it wrote:

$wgULSGeoService = 'https://freegeoip.net/json/?callback=?';

acutal loading url is like: https://freegeoip.net/json/?callback=jQuery32108xxxxxxxxxxxxxxxxx

I guess the format for freegeoip.app is correct https://freegeoip.app/json/

However, I tried to set $wgULSGeoService, but nothing changed in my wiki. Still loading from the shotdown url. Strange! (talkcontribs)

Same issue here

Reply to "$wgULSGeoService and http://freegeoip.net/shutdown"

Special:MyLanguage and Search Translation headers

Fabdoka (talkcontribs)

Hello everybody,

I use on multiple MediaWiki installations the MediaWiki language extension bundle. I'm very happy but I have two problems:

  1. The Extension: UniversalLanguageSelector passes, when selecting a language, the open article not on Special:MyLanguage so the article remains in the source language. How can I change it, or is there a possibility to send all URLs on Special:MyLanguage?
  2. Although it is possible to translate a heading, but the search for the translated title is not possible. How can I search for the translated headings?

Many thanks for your help.

Best regards


Tuxxic (talkcontribs)

Hi, for 1), have you tried this snippet proposed on the MLEB ?


* If set to true, when a user selects an interface language via ULS (Universal

* Language Selector), if the current page is a translatable page or a translation

* page then the user is also redirected to the corresponding translation page

* in the selected language.


* The language of the translation pages visited afterwards will still depend on the

* links followed (it will be the interface language only if the links use the

* Special:MyLanguage syntax).

* @since 2013-03-10


$wgTranslatePageTranslationULS = true;

Fabdoka (talkcontribs)

Hi @Tuxxic,

thanks $wgTranslatePageTranslationULS = true; works for me =)

Do you also have an answer to the second problem?

Tuxxic (talkcontribs)

Hi @Fabdoka,

You're right, I have only the page name in home language followed by the code of the language it is translated.

I think it is not possible due to the way Translate is doing its job on title translation, but I can be wrong.

I think we can file a bug report on this, if it can be fixed !

removal of English or own languages from language selection

Giacomo Lanza (talkcontribs)


I often do searches on Wikidata when translating words into multiple languages. Since the number of languages in the preview is limited, I would like to kick off either English, or my mother tongue (Italian), in order to see more of the other languages for which I have more doubts concerning orthography. That seems anyway not possible with the Universal Language Selector: - when adding new languages, the last ones introduced leave the place, while English and my mother tongue are always displayed. Would it be possible to change this behaviour?



Amire80 (talkcontribs)

This is probably not related to Universal Language Selector and more related to Wikidata itself. You can try adding a Babel box to your user page at wikidata.org or to your global user page at meta.wikimedia.org.

Giacomo Lanza (talkcontribs)

תודה מאוד אמיר,

I tried it and actually something happened. The default language selection corresponds to the Babbel box in my Wikimedia profile, so removing English did work :) Anyway Wikidata allows selecting just *one*. Peace.

до свидания (I would like to know so many languages as you!)


Reply to "removal of English or own languages from language selection"