Extension talk:UniversalLanguageSelector


To be used everywhere?

Is this extension going to be enabled for all wikis? Yair rand (talk) 17:49, 3 December 2012 (UTC)

Yes, that is the plan. But it might take a few months before we achieve that. Santhosh.thottingal (talk) 04:51, 17 January 2013 (UTC)

How Does this tool interact with accpet-language and what the user chooses with the tool

I upgraded to 1.20.2 and installed the latest "Language Extension Bundle"

I set the Accept-Header in my browser to "fr" (verified with firebug).

By default I see the english version of my page (and built-in MW text in english too).

If I use the ULS (universal language selector) and set to french I also by default see the english version of my page (but I do see the built-in mediawiki text in french).

I removed the uls-previous-languages cookie and refreshed my page. My authentication is done with a custom extension and it does not set any cookie or setting related to language (and my LocalSettings.php does not set wgDefaultLanguage.

I would like this to happen: 1) accept-language is used for mediwiki text (Im talking about the text rendered by mediawiki not by my content). If not set it defaults to $wgDefaultLanguage 2) accept-language is used to decide which translate page to render.

I dont see how it would make sense to do it any other way - and I assumed that the language bundle would just do things this way. Basically, if a french browser comes to my site, they see the french version of the page - they should not have to select the french link and wait for ye another page refresh.

Regarding point #2:

It seems the "language specific" page is the one with the /<lang> appended in the URL. And this allows a french browser to see the english page. Etc. this is all fine.

but by default, the rendering of the page with no /<lang> appended tot he URL should be based on the accept-language header. But its not.

I even use the "universal language extension" and select "french" and it STILL displays the default page never the french page.

If I fiddle with $wgLanguageCode and $wgDefaultLanguage I can get strange things to happen. I should not have to touch these, the extensions should be doing all this right?

Mike Papper Bodaro (talk) 20:34, 13 February 2013 (UTC)

i found a bug for it

sorry,i not mush know how to report this,i only can found is here. the bug is,if you are a new use,(never setting anything before),click the langguae button,selecet ime,this will nothing come out,it means you even cant disable the keyboard icon.

File:JustCapIt5594.jpg

i use a temp way to fix it: /UniversalLanguageSelector/resources/js/ext.uls.inputsettings.js

		prepareLanguages: function () {
			var inputSettings = this,
				SUGGESTED_LANGUAGES_NUMBER = 3,
				selectedImeLanguage = $.ime.preferences.getLanguage() || "en", //if never define a language,like first time,it will make mistake
				languagesForButtons, $languages, suggestedLanguages,
				firstLanguage, lang, i, language, $button, $caret;

Theslboat (talk) 13:48, 18 April 2013 (UTC)

Thanks, I copied your report to bugzilla:46841. Nemo 12:52, 25 April 2013 (UTC)

Modifying Default Settings

Previously I have been using Narayam extension with great success and customization to fit my local wiki. Updating to this extension I was hoping to set it up to fit my wiki but I seem to be confused as to how to edit the default settings. Some of the following are things I want to do

1) I want to set up the default input language to be loaded regardless of country or interface language

2) similarily I want to set up the default interface language. However, is there anyway not to force changing the font a person already has when doing this. After this, everytime I refresh the page, it gdisplays the original font and then quickly reverts back to the font as set in webfont.

In addition is it possible to change both interface and input with a single drop down menu. For mixed content wiki, sometimes english is better for interface while allowing local language input.

3) How to remove some country/language options from the drop down as my wiki caters to a niche population. I only want english and my local language to be displayed as choices for interfase and input

4) previously using control+M on keyboard combination enabled the input for my local language from english while changing the background where inputs are written to a light blue color to differentiate the input method has changed. Possibility of the color to come back as the color change is a great and simple way for users to tell when they are quickly switching between the input methods using Ctr+M keyboard.

6) How to disable the webfont function in ULS.

5) The transliteration drop down menu is small and often if the mouse button is still hovering in the search bar, the default popup mentioning the search bar covers the transliteration drop down making it hard to select unless mouse is moved away. A better and easily accessible location should be though of.

I previously worked with the developer of Narayam (Junaid) with these features by suggesting ideas and by requesting for the amharic language better and making the input better. If you can briefly describe me the process to do the above things I would greatly appreciate it. Thank you for the great work.

Thanks Wikimanz (talk) 06:26, 7 July 2013 (UTC)

1) I want to set up the default input language to be loaded regardless of country or interface language
This is not possible with ULS. The default language for an input method will be the wiki's content language. Initially, input methods are enabled, and no keyboard mappings are active. A user will have to enable a keymapping. siebrand (talk) 17:16, 8 July 2013 (UTC)
2) similarily I want to set up the default interface language. However, is there anyway not to force changing the font a person already has when doing this. After this, everytime I refresh the page, it gdisplays the original font and then quickly reverts back to the font as set in webfont.
MediaWiki provides the wiki's content language by default. There is no feature to have it different from the content language. ULS allows to set the UI language to the language identified through the Accept-Language of the browser of the user. Related settings in LocalSettings.php are $wgULSLanguageDetection, $wgULSAnonCanChangeLanguage and $wgULSEnableAnon.
See Extension:Universal_Language_Selector#Configuration for more details. siebrand (talk) 17:19, 8 July 2013 (UTC)
3) How to remove some country/language options from the drop down as my wiki caters to a niche population. I only want english and my local language to be displayed as choices for interfase and input
ULS has no such feature at the moment. We are open to receiving patches. siebrand (talk) 17:20, 8 July 2013 (UTC)
I would like to add my voice to this request. For two-language wikis, the dropdown is far more featureful and inclusive than necessary. Perhaps there could be an array of languages offered. Indeed, I don't even really want the flyout---I just want to offer a link that says "Switch language" that toggles from one language to the other, or perhaps a pair of flags that you can click on to set the language. (This is common on bilingual pages.) Larrydberg (talk) 23:38, 7 October 2013 (UTC)
Edit the file UniversalLangauageSelector.hooks.php
Find the function addVariables. (Line 248)
	public static function addVariables( &$vars, OutputPage $out ) {
		// This is the original code
		//$vars['wgULSLanguages'] = Language::fetchLanguageNames(
		//	$out->getLanguage()->getCode(), 'mwfile'
		//);
		// The following line is a limitation, to two languages.
		$vars['wgULSLanguages'] = array('en'=>'en', 'hu'=>'hu');
		
		$vars['wgULSAcceptLanguageList'] = array_keys( $out->getRequest()->getAcceptLang() );
		return true;
	}
It is not perfect, and a bit hackish, but should do the job. LaKing (talk) 07:02, 22 November 2013 (UTC)
If anyone is wondering in 2023, this is currently in ResourceLoaderULSModule.php (line 44-48).
@LaKing thanks for this solution, still super helpful :-) Devaroo (talk) 21:50, 22 November 2023 (UTC)
4) previously using control+M on keyboard combination enabled the input for my local language from English while changing the background where inputs are written to a light blue color to differentiate the input method has changed. Possibility of the color to come back as the color change is a great and simple way for users to tell when they are quickly switching between the input methods using Ctr+M keyboard.
Thank you for the suggestion. We decided to drop background coloring to reduce interface clutter and make things more consistent. There are no plans to bring that feature back. siebrand (talk) 17:22, 8 July 2013 (UTC)
6) How to disable the webfont function in ULS.
Disabling web fonts in ULS is not possible. Users can disable web fonts on a per language basis, and it is possible to do some customisation. siebrand (talk) 17:24, 8 July 2013 (UTC)
"Sometimes there are multiple fonts for a language and there is a default font for each language/script": it would be useful to have a readable table of what's default for what, so that users know to expect when they install ULS on their wiki. Is the big one-line json file the only place currently, or is there something else to work on? Nemo 07:08, 9 July 2013 (UTC)
5) The transliteration drop down menu is small and often if the mouse button is still hovering in the search bar, the default popup mentioning the search bar covers the transliteration drop down making it hard to select unless mouse is moved away. A better and easily accessible location should be though of.
We have considered many options. We are open to a better option that the one currently implemented. See bugzilla:50787, comment 4 for a detailed list of considerations by one of our user interaction designers. siebrand (talk) 17:31, 8 July 2013 (UTC)
As you can see I have chosen to reply to your 6 items in 6 different sub-threads. I think that makes the discussion easier to follow. I would like to request that you start separate threads in the future, or use Bugzilla, our issue tracker, to report feature requests and change requests.
I previously worked with the developer of Narayam (Junaid) with these features by suggesting ideas and by requesting for the amharic language better and making the input better. If you can briefly describe me the process to do the above things I would greatly appreciate it. Thank you for the great work.
We haven't heard from Junaid for a long time; aside from the input methods that have been taken over from Narayam, I don't think Junaid has contributed to ULS yet. We'd love to work with him again.
I've tried to reply to each of your requests. Some I would not consider as features that would be supported in ULS, others could be supported, but will not be prioritized by Wikimedia Language Engineering anytime soon. As said, we do accept patches, and we are open to discuss options with volunteer developers. We will also review code submissions for Project Milkshake components, as well as Extension:UniversalLanguageSelector.
Thanks for all your feedback. siebrand (talk) 17:35, 8 July 2013 (UTC)

Webfonts reloading font on top of system font

Hi there, I have installed this extension on my website and I am currently testing it out. One problem I have observed on my website but also on the Amharic language wikipedia (http://am.wikipedia.org/wiki/%E1%8B%8B%E1%8A%93%E1%8B%8D_%E1%8C%88%E1%8C%BD) is that this extension loads the AbyssinicaSIL font on top of already existing system fonts even though users have the system font. This causes the system font to load first which is quickly replaced by the AbyssinicaSIL font which comes of disturbing to the eye.

I have tried to set the order of preference going to the MediaWiki:Common.js page and $.webfonts.repository.languages.languageCode = ["system", "AbyssinicaSIL "]; to stop this however it keeps happening. It is great to see the webfonts working on mobile devices with no fonts but when this disturbs on computers it takes a hit on usability.

Can you advice me on how to deal with this. Wikimanz (talk) 14:45, 16 October 2013 (UTC)

Chromebook Compatibility

I use a Google Chromebook™. A Chromebook™ uses Google Chrome™ and only Google Chrome™. A Chromebook™ is all Google software so applications such as Skype™ or iTunes® are not available. I am wondering if the extension is compatible for my computer. I am not much of a computer guys. Well, I am not much of a developer. Please get back to me when you can. Burkes13 17:17, 31 January 2014 (UTC)

About the client-side compatibility (accessing an existing wiki), Chrome should be ok. Or are you trying to install MediaWiki on the Chromebook itself? Ricordisamoa 20:28, 5 February 2014 (UTC)

Why Does ULS Overwrite Button Classes?

Could someone explain the reasoning for overwriting all button classes by this extension? I can see no reason to force CSS styles on buttons. Using the extension's div containers so they don't override all button classes site wide would make this extension more friendly to other skins. Thanks! Hutchy68 (talk) 02:55, 16 February 2014 (UTC)

Can you make a specific example please? Extension maintainers are smart, but silly bystanders like me don't get it. Nemo 22:19, 6 March 2014 (UTC)
Sure, someone has a custom skin which may not match Vector. Buttons for search and/or editing may differ and match the styling of the skin. Since the file
ext.uls.buttons.css
is really to style Display and Input Settings of the ULS pop-up. At least, this is all I can see they would be used for. This code is overriding and mixing in with custom button styling.
button.button {
	display: inline-block;
	padding: 0.4065em 1.2195em 0.4065em;
	font-size: 0.813em;
	font-weight: bold;
..... etc...
So doing something like this...
#languagesettings-settings-panel button.button {
	display: inline-block;
	padding: 0.4065em 1.2195em 0.4065em;
	font-size: 0.813em;
	font-weight: bold;
....etc...
Wraps ULS css and keeps it where it should be invoked in the pop-up. Hutchy68 (talk) 13:20, 8 March 2014 (UTC)

Input methods using ` (grave accent)

This is with regard to transliteration method


in this linkit is written that ਼ ` nukta. For example, to write "ਜ਼", type "j`a [1]But j'a combination of letters doesnnot generate the required character "ਜ਼". please get this solved.Help link is obtained from input link of universal language selector tool when we select punjabi as input langage and transliteration as input method.

  1. ਼ ` nukta. For example, to write "ਜ਼", type "j`a"

mredia wiki version used Version MediaWiki 1.23wmf18 (7253e5a) Guglani (talk) 13:17, 20 March 2014 (UTC)

You should report a bug so the relevant developers of the extension receive this report Ciencia Al Poder (talk) 10:32, 21 March 2014 (UTC)
Thanks for reply. In fact I rechecked .instead of apostrophe when I used a similar shape character listed below tilde in keyboard(i do not know name of this character) I got correct results in vista system with Firefox browser and problem got solved by itself.
unfortunately this character is not available on apple IPad . So it becomes a device problem for this character .any way thanks again for suggesting place for bug. Guglani (talk) 15:38, 22 March 2014 (UTC)
I recalled name of character now used to produce correct results , it is back tick. Unfortunately back tick is not available on my iPad key board so this becomes limitation. Guglani (talk) 16:29, 22 March 2014 (UTC)
I cannot reproduce, it works for me. Ah, yes, you need that weird `, I see Indians using it a lot so I suppose it's common in keywords sold there (for me it's alt-gr + ' on an Italian keyboard, for instance). Maybe we could add ' as alias? Nemo 17:57, 22 March 2014 (UTC)
subsequently i found character back tick '`' on apple iPad keyboard also by long pressing character ' single apostrophy and choosing from 3 displayed options character ` back tick . and rendering of character ਜ਼ is now not a problem as such. Guglani (talk) 11:20, 23 March 2014 (UTC)

Has this been tested with IE8?

The popup just doesn't show when i click the gear icon or the "button" in the personal toolbar. Also, if i somehow manage to get the "input tools" turned on (e.g., using another browser), they interfere with cursor movement within the editing textarea... Jokes_Free4Me (talk) 02:22, 8 April 2014 (UTC)

New user registration doesn't copy the detected language into their preferences

1. you open a wiki not being logged in.

2. It correctly detects your languages using ULS

3. You register.

4. After logging in the wiki starts to display pages in its default languauge.

How to make it copy detected language into your preferences while registering?

A separate question. Is it possible to automatically copy into your preferences the currently selected by the trigger language? Gleki.arxokuna (talk) 08:08, 10 June 2014 (UTC)

What version of MediaWiki and ULS are you using? I thought this used to work at some point, but I was told it didn't. Related: gerrit:120475 (last comment/question). Nemo 10:54, 10 June 2014 (UTC)
MW 1.24 alpha
ULS 2014-05-31 (2988f1c) 19:39, 7 June 2014
The wiki is here: http://mw.lojban.org/index.php?title=Special:Version
You can test this wiki yourself. The default language of the wiki is "jbo".
After registering click on any link (e.g. the logo) and see that the wiki is now in its default language. Gleki.arxokuna (talk) 12:04, 10 June 2014 (UTC)

Under the logo?

What would be the code to move the button to the under the logo position? Currently i can copy

<a href="#" class="uls-trigger autonym" tabindex="0" role="button" aria-haspopup="true" original-title="">English</a>

and it works in any positions however, the name of the language is hardcoded and there is no magic word for changing it to the name of the currently dispalyed language. Any suggestions? Gleki.arxokuna (talk) 16:35, 19 June 2014 (UTC)

Under the logo? Why, what skin are you using? To have it as it is on this wiki, just set $wgULSPosition = 'personal';. Nemo 22:48, 19 June 2014 (UTC)
I'm using Vector. No, "personal" puts it to the personal bar. I want it directly under the logo banner. Gleki.arxokuna (talk) 04:53, 20 June 2014 (UTC)
<syntaxhighlight lang='text'>mw.config.get( 'wgULSCurrentAutonym' )</pre> will give you the current language autonym. There is no easy way to have this in the ULS trigger. You need to have some javascript to show this text there. Santhosh.thottingal (talk) 06:14, 20 June 2014 (UTC)
Sorry, but how to inject javascript to the mediawiki page? Gleki.arxokuna (talk) 06:22, 20 June 2014 (UTC)
See Manual:Interface/JavaScript Santhosh.thottingal (talk) 06:32, 20 June 2014 (UTC)

How-to reduce the number of, or reorder, languages

in the language bar (ie the dropdown dialog)? setting wgULSLanguages or wgULSAcceptLanguageList  don't work for me. I have the 2015-03-30 version of ULS. Hypergrove (talk) 01:30, 21 August 2015 (UTC)

How to enable ULS on MobileFrotnend

I've been using ULS on my website for quite some time. However, I recently installed mobilefrontend extension and would like to enable ULS to work on mobile website. I currently do not see ULS when mobilefrontend is enabled and browsing mobile website. How can I enable ULS on mobilefrontend? Wikimanz (talk) 02:01, 12 November 2015 (UTC)

Special:MyLanguage and Search Translation headers

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


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 Fabdoka (talk) 10:04, 29 April 2016 (UTC)

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; Tuxxic (talk) 12:05, 2 August 2016 (UTC)
Hi @Tuxxic,
thanks $wgTranslatePageTranslationULS = true; works for me =)
Do you also have an answer to the second problem? Fabdoka (talk) 20:59, 18 August 2016 (UTC)
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 ! Tuxxic (talk) 08:47, 19 August 2016 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

UniversalLanguageSelector conflicts with User Account Preferences

I'm not sure why, but if this extension is enabled, I will not get access to the "Preferences" page under the User's homepage (as in where you can change your password and email address).

What I get is a "Database Error" on the page title, with the contents only displaying: "[4e71f2d9992b54b355af4b8e] 2016-12-26 15:12:39: Fatal exception of type "DBQueryError"". Is there something I need to with the database? The page returns to normal once I disable the extension.

Mediawiki: 1.28 UniversalLanguageSelector for 1.28.

phpMyAdmin: 4.0.10.14 Database server: MariaDB 10.0.27-MariaDB-cll-lve - MariaDB Server Web server: cpsrvd 11.60.0.28 / Database client version: libmysql - 5.1.73 Strykes1 (talk) 15:43, 26 December 2016 (UTC)

pt and pt-br

Why is portuguese divided in two different languages? This makes maintenance and translations an ordeal, especially considering how close to each other they actually are. ArgonSim (talk) 22:22, 29 January 2017 (UTC)
Not really. If a message is translated the same way in the two variants, there is no need to translate it twice because MediaWiki uses language fallback to show the existing translation to users who choose the variant. Helder 11:10, 31 January 2017 (UTC)
See also Project:Support desk/Flow/2016/12#h-pt_and_pt-br_distiction-Not_Found-2016-12-21T17:17:00.000Z. Helder 11:23, 31 January 2017 (UTC)
Where do you see it? Amir E. Aharoni {{🌎🌍🌏}} 22:29, 29 January 2017 (UTC)
I'm sorry for not being so specific; I was actually referring to the language selector right next to the user page link and the alerts icon, not to the one normally located on the sidebar. As you can see, Portuguese is currently divided in "português do Brasil" and "português", which cannot be justifiable when taking into account how similar to each other they actually are. ArgonSim (talk) 22:43, 29 January 2017 (UTC)
OK, so you are referring to the selector of the site's user interface language. This is expected behavior. In MediaWiki there are localizations for Portuguese and Brazilian Portuguese. This only refers to the user interface language of the site—the menus. Something like this is also available for English and British English and for some other pairs of language variants.
So this is not a Universal Language Selector issue.
If you think that MediaWiki's user interface should only be translated to one variant of Portuguese, that is an issue to discuss among Portuguese-speaking MediaWiki users and translators. Amir E. Aharoni {{🌎🌍🌏}} 23:08, 29 January 2017 (UTC)

Fonts

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? Belze (talk) 10:25, 14 February 2017 (UTC)

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. Amir E. Aharoni {{🌎🌍🌏}} 10:34, 14 February 2017 (UTC)

Searching problem.

Why when I type "English" in the search box, results does not include "Canadian English"? C933103 (talk) 05:02, 23 November 2017 (UTC)

Thanks. It's a known bug that we'll resolve soon. Amir E. Aharoni {{🌎🌍🌏}} 09:12, 23 November 2017 (UTC)

Newly registered languages are not searchable

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!! Sophivorus (talk) 18:28, 21 December 2017 (UTC)

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 Nikerabbit (talk) 09:17, 22 December 2017 (UTC)
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! Sophivorus (talk) 22:07, 22 December 2017 (UTC)
Sorry for jargon, the language database is https://github.com/wikimedia/language-data which is imported in ULS as https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector/blob/master/lib/jquery.uls/src/jquery.uls.data.js Nikerabbit (talk) 14:52, 23 December 2017 (UTC)
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? Sophivorus (talk) 17:36, 23 December 2017 (UTC)
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' } );
} ); Nikerabbit (talk) 21:49, 23 December 2017 (UTC)

how to setup font new for skin vector

how to setup font new for skin vector?

please help me Sokote zaman (talk) 23:15, 9 January 2018 (UTC)

how to setup font new for skin vector

how to setup font new for skin vector?

please help me

tanks Sokote zaman (talk) 13:28, 3 July 2018 (UTC)

Webfont on mobile sites

Is there a way to enable ULS/Webfonts on mobile sites? NinjaStrikers «» 13:30, 7 August 2018 (UTC)

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

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=?';

Spas.Z.Spasov (talk) 18:18, 20 August 2018 (UTC)

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! Deletedaccount4567435 (talk) 00:33, 1 September 2018 (UTC)
Same issue here 104.142.125.214 (talk) 22:15, 15 June 2019 (UTC)

removal of English or own languages from language selection

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 Giacomo Lanza (talk) 10:34, 16 September 2018 (UTC)

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. Amir E. Aharoni {{🌎🌍🌏}} 11:50, 16 September 2018 (UTC)
תודה מאוד אמיר,
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 Giacomo Lanza (talk) 13:15, 27 September 2018 (UTC)

How to add a new suggested language

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? 39.53.93.157 (talk) 12:05, 28 December 2019 (UTC)

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. Amir E. Aharoni {{🌎🌍🌏}} 12:12, 28 December 2019 (UTC)
Thank you for your reply, I want to add it for virtual keyboard that appears in search box and for all users. 39.53.93.157 (talk) 13:32, 28 December 2019 (UTC)
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. Amir E. Aharoni {{🌎🌍🌏}} 14:21, 28 December 2019 (UTC)
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 39.53.93.157 (talk) 15:12, 28 December 2019 (UTC)
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. Amir E. Aharoni {{🌎🌍🌏}} 18:20, 28 December 2019 (UTC)
So there is no way to force ULS to add multiple default languages. 39.53.93.157 (talk) 02:26, 29 December 2019 (UTC)

Unexpected EOF in archive

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


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 Lwangaman (talk) 15:45, 14 April 2020 (UTC)

From https://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdistname=UniversalLanguageSelector&extdistversion=REL1_34 I get the link https://extdist.wmflabs.org/dist/extensions/UniversalLanguageSelector-REL1_34-21100eb.tar.gz; locally that expands fine. Are you using that archive or a different one? Jdforrester (WMF) (talk) 17:39, 14 April 2020 (UTC)
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? Lwangaman (talk) 17:51, 14 April 2020 (UTC)
It's possible that the file was corrupted when you uploaded it via FTP (or whatever). Jdforrester (WMF) (talk) 18:02, 14 April 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Detect wich language is used?

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? 91.66.161.14 (talk) 23:47, 25 May 2020 (UTC)

Hebrew messes up site layout

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


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? Vishkujo (talk) 07:40, 9 July 2020 (UTC)

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. Amir E. Aharoni {{🌎🌍🌏}} 09:46, 9 July 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Get data from ULS to template or module

How to get data (list of user’s languages in order of preference) from ULS to template 217.117.125.72 (talk) 12:57, 7 November 2020 (UTC)

compile.php still needed?

The instructions say to use compile.php, but it seems not to exist. Is that instruction out of date? Inductiveload (talk) 11:54, 31 December 2020 (UTC)

Do you mean compile-font-repo.php? Amir E. Aharoni {{🌎🌍🌏}} 09:44, 4 January 2021 (UTC)
I figured it out and updated the documentation myself :-D. Inductiveload (talk) 10:26, 4 January 2021 (UTC)

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

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? 178.7.208.231 (talk) 13:57, 11 April 2021 (UTC)

Hello,

I don't need ULS at my wiki, but now without ULS the language links are not shown. Can you remove this dependancy please? Fokebox (talk) 11:16, 14 April 2023 (UTC)

If you want the Vector 2022 skin and interlanguage links, then you do need ULS. Amir E. Aharoni {{🌎🌍🌏}} 13:50, 14 April 2023 (UTC)
By the way interwiki links works fine with other skins without ULS extensions. Fokebox (talk) 07:45, 17 April 2023 (UTC)
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
|} Fokebox (talk) 14:47, 14 April 2023 (UTC)
I think that it can be changed with one of the configuration variables. $wgULSLanguageDetection is the first one I'd try. Amir E. Aharoni {{🌎🌍🌏}} 15:14, 14 April 2023 (UTC)
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 ( Fokebox (talk) 06:54, 18 April 2023 (UTC)

How to remove or edit the message in the sidebar

"On this Wiki the language links are at the top of the page across from the article title. Go to top." 198.210.88.235 (talk) 12:07, 8 July 2023 (UTC)

Change font within an article using class selector

I want to use the Junicode font in articles only for text that is transcribed from old manuscripts. Nothing else on the page will need to use this font. The Junicode font is included in the UniversalLanguageSelector library.

If I load this extension, it does appear that I can choose the font using a CSS class with 'font-family: Junicode;', but not all of the characters display.

I would like to use the ss02 character set, which includes the insular characters. In the documentation it says "ss02 on, language set to Irish". So I tried to use the 'lang="Irish"' setting.

For instance:

<span class="junicode" lang="Irish"></span>

It doesn't seem to do anything.

I can't figure out how to access specific characters, such as the insular t with dot above. On the MUFI website, it says that it is "00F094 LATIN SMALL LETTER INSULAR T WITH DOT ABOVE". If I use &#xf094; in the text, it renders as the replacement question mark. I can see this character in the Irish_text.pdf included with the Junicode documentation with the Junicode font installed in Windows, but I can't figure out how to get Mediawiki to display it.

Is this possible in Mediawiki? Even if I look at Medieval Unicode Font Initiative on Wikipedia, none of the characters display if I don't have the Junicode font installed on my local system. And when I do have the font installed, this insular t with the dot above does not display.

Thanks. Redheadkelly (talk) 22:56, 24 November 2023 (UTC)

Why is language selector at the bottom of the Main Page?

Using Vector 2022, the language selector is normally to the right side of the H1, which makes sense and is easily seen. On the wiki's main page however, it seems to be all the way at the bottom of the page.

And I don't mean at the bottom of the browser window via "position: fixed" either, but actually at the bottom of the HTML content, so you have to scroll all the way down.

That's very counter-intuitive and difficult to find. Maybe it makes sense for some types of wikis, but not in general. Perhaps there should be an option to make ULS treat the Main Page like any other article? TaylanKammer (talk) 13:10, 14 January 2024 (UTC)

Ordered list in Usage section doesn't work

Everything is just labelled as "1." Reedy (talk) 16:13, 14 January 2024 (UTC)

Looks like a bug in Translate when working with Parsoid – compare https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector?useparsoid=1 (which presumably you're defaulting to?) vs. https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector?useparsoid=0 Jdforrester (WMF) (talk) 16:15, 14 January 2024 (UTC)

Latest version of Junicode font

I believe this means that the Junicode font has been updated to the latest version, which is 2.206.

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/UniversalLanguageSelector/+/966445

But I just downloaded the extension today and the Junicode font.ini file says 'version=1.002'.

I am using this font with a transcription of a Latin manuscript and it definitely is not providing the characters from version 2.206.

https://www.rosssurnameproject.net/wiki/index.php/Source:Scottish_document_Liber_Insule_Missarum,_no._31

I have the latest version of the font installed on my local machine and if I disable the extension, it loads the font from my machine and looks exactly how I would expect it to look. But when I re-enable the extension, it uses an older version of the font.

I'm not sure if there is something else I need to do here or if this has something to do with the extension itself. Redheadkelly (talk) 01:31, 2 May 2024 (UTC)

@Redheadkelly: On https://www.rosssurnameproject.net/wiki/index.php/Special:Version it lists that you're using the 2022-07-28 release of ULS. The patch you link was landed in December 2023; you will need to upgrade to a later version of the extension, which will also need you to upgrade your wiki (it's running MediaWiki 1.39.6; the extension nowadays requires MediaWiki 1.40+). Jdforrester (WMF) (talk) 14:33, 13 May 2024 (UTC)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi all. At paragraph 5 , the link "This guide" leading to -> http://www.webcoder.de/2010/06/04/how-to-configure-your-webserver-for-webm-video-and-audio-files/ does not answer and falls in timeout. Can some one correct or realign please ? Thanks. --Christian 🇫🇷 FR (talk) 13:00, 23 May 2024 (UTC)

Done. Tactica (talk) 04:46, 7 December 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Composer

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Like CLDR, seems not to be installable with Composer.Alexander Mashin talk 09:57, 26 July 2024 (UTC)

Yes, installing with composer is an anti-pattern and generally not supported. Jdforrester (WMF) (talk) 13:44, 26 July 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.
Category:Talk pages using deprecated source tags Category:Talk pages with broken file links