Extension talk:UniversalLanguageSelector

About this board

How to remove or edit the message in the sidebar

1 (talkcontribs)

"On this Wiki the language links are at the top of the page across from the article title. Go to top."

Reply to "How to remove or edit the message in the sidebar"

Interwiki links dependancy on ULS at Vector-2022 skin

Fokebox (talkcontribs)


I don't need ULS at my wiki, but now without ULS the language links are not shown. Can you remove this dependancy please?

Amire80 (talkcontribs)

If you want the Vector 2022 skin and interlanguage links, then you do need ULS.

Fokebox (talkcontribs)

By the way interwiki links works fine with other skins without ULS extensions.

Fokebox (talkcontribs)

I have some issues with ULS at my wiki farm website.

  • One of the problems is that when user is logged the language of the relevant localisation is correct, i.e. at en.mywikifarm.org is English, es.mywikifarm.org is Spanish, but once a user is logged our all localisations are in Russian. So is there a way to set default language for ULS? By the way $wgLanguageCode is set to the relevant value of a localisation.
  • The second problem: once the ULS is installed. I do see language links at interwiki box, but if do some actions (logging in, logging out, editing etc.) the links disappears.

At version 1.36.6 all worked fine and I didn't need ULS extension. Now I use:

MediaWiki 1.39.3
PHP 8.0.28 (cgi-fcgi)
MySQL 5.7.34
ICU 57.1
Amire80 (talkcontribs)

I think that it can be changed with one of the configuration variables. $wgULSLanguageDetection is the first one I'd try.

Fokebox (talkcontribs)

I have tried, but it doesn't work. And in general extension works not so good with several bugs at my wiki farm:

  • Interwiki links sometimes appears and some times disappears.
  • The language of the farm is determined for logged in user, but for not logged in users for all farms language is Russian in spite of that $wgLanguageCode is determined for every localisation.
  • The pages uploads much longer with this extension.
  • The button itself with interwiki links functions when clicked and unclicked work incorrectly, I mean when it is clicked the box with links appears, when I click the page somewhere else the box do not disappears.

Basically I don't need ULS extension as the language is determined by $wgLanguageCode, but I do need interwiki links. Previously at MW 1.38.6 all worked perfect without ULS extension.

I don't know how to resolve all this bugs (

Reply to "Interwiki links dependancy on ULS at Vector-2022 skin"

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?"

compile.php still needed?

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"