Search by

mediawiki / universal-language-selector

Nikerabbit

The primary aim is to allow users to select a language and configure its support in an easy way. Main features are language selection, input methods and web fonts.

Package info

github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector

Homepage

Issues

Language:JavaScript

Type:mediawiki-extension

pkg:composer/mediawiki/universal-language-selector

Statistics

Installs: 19 314

Dependents: 0

Suggesters: 0

Stars: 22

2026.09 2026-09-15 13:41 UTC

This package is auto-updated.

Last update: 2026-10-24 14:59:11 UTC


README

== Universal Language Selector ==
The Universal Language Selector extension (ULS) provides a flexible way to
configure and deliver language settings like interface language, fonts, and
input methods (keyboard mappings). This will allow users to type text in
different languages not directly supported by their keyboard, read content in a
script for which fonts are not available locally, or customise the language in
which menus are displayed.

For more information see:
 https://www.mediawiki.org/wiki/Universal_Language_Selector

== Copying ==
You may use any Project Milkshake product, including the Universal Language
Selector, under the terms of either the MIT License or the GNU General Public
License (GPL) Version 2 or later.

See GPL-LICENSE and MIT-LICENSE for details.

== Installation ==
For a very, very quick start add the following lines to LocalSettings.php of
your MediaWiki setup:

wfLoadExtension( 'UniversalLanguageSelector' );

By default, ULS will appear at personal toolbar position. If you want ULS at
interlanguage position, add the following line:

$wgULSPosition = 'interlanguage';

== Skin configuration ==
A skin can change how ULS works on it by declaring the
UniversalLanguageSelectorSkinConfig attribute in its skin.json, keyed by skin
name. All keys are optional. tests/phpunit/integration/SkinConfigTest.php
checks the values that the loaded skins declare.

"attributes": {
	"UniversalLanguageSelector": {
		"SkinConfig": {
			"myskin": {
				"CoreFeaturesOnly": false,
				"Features": {
					"LanguageDescriptions": false,
					"LanguageSettingsQuickAction": true
				},
				"FloatingPlacement": null,
				"LanguageInHeaderConfig": null,
				"LanguageInMainMenuConfig": null,
				"ULSDisplaySettingsInInterlanguage": false
			}
		}
	}
}

* CoreFeaturesOnly: ULS adds only its core features. It skips compact language
  links, its entry points, setlang handling and the user preferences. The skin
  must render its own content language button. Used by Minerva.
* Features.LanguageDescriptions: the content language selector shows the page
  title in each language.
* Features.LanguageSettingsQuickAction: the content language selector shows the
  "Language settings" action.
* FloatingPlacement: where the content language selector opens, relative to
  its trigger. The default is "bottom-end". ULS passes the value to Floating UI
  as the "placement" option. For all values, see:
   https://floating-ui.com/docs/computePosition#placement
  It has no effect on mobile viewports, where the selector opens full screen.
* LanguageInHeaderConfig: the name of a setting with "logged_in" and
  "logged_out" values that says whether the skin shows a language button in
  the page header. When it does, ULS binds the button and turns off compact
  language links. When it does not, ULS turns on compact language links.
  Used by Vector 2022.
* LanguageInMainMenuConfig: the name of a setting with "logged_in" and
  "logged_out" values that says whether the languages are also in the main
  menu. When they are, ULS does not change compact language links, and the
  wiki config and user preference decide. Used by Vector 2022.
* ULSDisplaySettingsInInterlanguage: the content language selector also gives
  access to the display and input settings.

== Developers ==
The MediaWiki Universal Language Selector project uses jquery.uls:
 https://github.com/wikimedia/jquery.uls

Its development is at Wikimedia Github account. Any fixes to lib/ should happen
at Github. Follow the build instructions of jquery.uls to create jquery.uls.js.

Bugs for the extension are handled in Phabricator:
 https://phabricator.wikimedia.org/tag/mediawiki-extensions-universallanguageselector/