Extension talk:UniversalLanguageSelector

Jump to navigation Jump to search

About this board

I get a 404 when i try downloading this Extension.

Still? Works for me now, gerrit often has occasional problems but trying in a couple minutes is usually enough. --Nemo 18:12, 18 November 2012 (UTC)

Jepp, still 404, that is the link i get: http://upload.wikimedia.org/ext-dist/UniversalLanguageSelector-master-a17df39.tar.gz --92.225.91.115 19:56, 18 November 2012 (UTC)

Ah, extension distributor is almost always broken and there's no use in it when there are no versioned releases, try --Nemo 20:31, 18 November 2012 (UTC)

How to add a new suggested language

7
39.53.93.157 (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.

39.53.93.157 (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.

39.53.93.157 (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.

39.53.93.157 (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

3
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:

IMPORTANT - PLEASE UPDATE YOUR API ENDPOINT

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/8.8.8.8?callback=?';
Zoglun (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/8.8.8.8?callback=?

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

104.142.125.214 (talkcontribs)

Same issue here

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

Special:MyLanguage and Search Translation headers

4
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

Fabian

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

3
Giacomo Lanza (talkcontribs)

Hallo,

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?

Thanks,

Giacomo

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!)

Giacomo

Reply to "removal of English or own languages from language selection"
Ninjastrikers (talkcontribs)

Is there a way to enable ULS/Webfonts on mobile sites?

Reply to "Webfont on mobile sites"

how to setup font new for skin vector

1
Sokote zaman (talkcontribs)

how to setup font new for skin vector?

please help me

tanks

Reply to "how to setup font new for skin vector"

how to setup font new for skin vector

1
Sokote zaman (talkcontribs)

how to setup font new for skin vector?

please help me

Reply to "how to setup font new for skin vector"

Newly registered languages are not searchable

6
Sophivorus (talkcontribs)

If I add a language from my LocalSettings.php using:

$wgExtraLanguageNames['wy'] = 'Wayuunaiki';

Then the language is properly registered in MediaWiki (it can be selected from my preferences) but it's not searchable through the ULS (for example in the dropdown list of the Translate extension, when selecting the language I want to translate to). I tried running the script:

php extensions/UniversalLanguageSelector/data/LanguageNameIndexer.php

but still nothing. Is this normal behavior? Is it a bug? What do I need to do to make my newly registered language searchable? Thanks!!

Nikerabbit (talkcontribs)

Ugh I forgot this part. You would need to add the language name to the language database in ULS too. "wy" is not a valid language code by the way. You should follow the standards when creating codes that don't exist instead of choosing unused codes randomly: https://en.wikipedia.org/wiki/IETF_language_tag

Sophivorus (talkcontribs)

Thanks! ULS seems to create no table in the database, so when you speak of the "language database in ULS" I assume you mean the file extensions/UniversalLanguageSelector/data/LanguageNameSearchData.php correct? If so, then I'm afraid I'm a bit lost as to how to add a language there (it's quite a scary file) but it seems to be generated by a script, so maybe there's a script designed to add a new language? Me and any future inquirers would be very grateful if you could give me/us just a little more help. Thanks again!

Nikerabbit (talkcontribs)
Sophivorus (talkcontribs)

Thanks again! I checked my file extensions/UniversalLanguageSelector/lib/jquery.uls/src/jquery.uls.data.js and indeed it seems to have the language data I was looking for. However, the language I wanted to add, "Wayuunaiki" (aka "Wayuu") was already there, and not searchable! I did some tweaks to other languages to verify that the file is actually connected to the Translate search engine, and it is, but for some reason "Wayuu" can't be found. Could this actually be a bug? Are you able to find "Wayuu", or happen to notice what the issue may be?

I also tried adding a totally new language to the file with:

"gua": [
    "Latn",
    [
        "AM",
    ],
    "Guambiano"
],

(yes, I made up the language code) but no luck. What could be missing?

Nikerabbit (talkcontribs)

This combo should do it (yes it is horribly complicated and should be made simpler):

Add this to LocalSettings.php

$wgExtraLanguageNames['qqk'] = 'Quack';

Comment out the following line in UniversalLanguageSelector/data/LanguageNameIndexer.php

// $wgExtraLanguageNames = [];

Run the script (make sure you have cldr extension installed).

Add this to MediaWiki:Common.js:

mw.loader.using( [ 'ext.uls.mediawiki' ] ).done( function () {
	// These three lines are needed if languages/i18n/qqk.json doesn't exist
	var x = $.extend( {}, mw.config.get( 'wgULSLanguages' ), { qqk: 'Quack' } ); 
	mw.config.set( 'wgULSLanguages', x );
	$.fn.uls.defaults.languages = x;
	// This is needed if langauge isn't yet in the ULS language database
	$.uls.data.addLanguage( 'qqk', { script: 'Latn', regions: [ 'EU' ], autonym: 'Quack' } );
} );
Reply to "Newly registered languages are not searchable"
C933103 (talkcontribs)

Why when I type "English" in the search box, results does not include "Canadian English"?

Amire80 (talkcontribs)

Thanks. It's a known bug that we'll resolve soon.

Reply to "Searching problem."
Belze (talkcontribs)

When I use a webfont, the page is first loaded with the system font, and after a little time, the text is redisplayed in the web font. This happens for every clicked page and not just on the first time the font is cached. It makes for a bad browsing experience. There is always a moment where the text is not styled with the webfont Do you have any suggestion to solve this problem?

Amire80 (talkcontribs)

Sorry, not really. This is one of the reasons why webfonts are not enabled by default.

We may fix this in the far future, but we don't plan to work on it in the coming months.

Reply to "Fonts"