Switch the YOURLS admin interface language from the Plugins page — no need to edit config.php.
Only languages with installed translation files are available for selection.
- Live language switching for the YOURLS admin interface, persisted in the database
- No
config.phpedits required — the override is applied on every page load via theget_localefilter - Only shows installed languages — the dropdown lists exactly the locales whose
.mofiles exist inuser/languages/; no ghost options, no silent failures - Reset to default — selecting English (default) removes the override and defers back to
config.php - Update notifications: checks GitHub for new releases and shows a badge in the admin panel
- Modular structure: split into
inc/modules and staticassets/, no composer, no npm, no build step
This plugin can only switch to languages whose translation files are already installed in your YOURLS instance.
Note: YOURLS does not ship with language files by default. If no languages appear in the dropdown, you need to download
.mofiles and place them inuser/languages/first.
Translation files for YOURLS are available in the YOURLS GitHub repository.
Copy the yourls-<locale>.mo file (e.g. yourls-it_IT.mo) into user/languages/ — the language will then appear automatically in the plugin's dropdown.
- Download the plugin from the latest release.
- Unzip the contents into the
user/plugins/language-switcher/directory. - Activate the plugin in the YOURLS admin panel under Plugins.
- Go to Plugins → Language Switcher and select the desired language.
Requires YOURLS 1.9+ and PHP 7.4+
- Open the Language Switcher settings page from the Plugins menu.
- Select the language from the dropdown. Only locales with an installed
.mofile inuser/languages/are shown. - Click Save Language. The change takes effect immediately on the next page load.
- To revert, select English (default) and save.
The plugin hooks into get_locale and returns the stored locale whenever a language is selected. If no override is stored, or if the stored locale no longer has a translation file, the filter passes through the original locale from config.php.
| Option key | Type | Notes |
|---|---|---|
yourls_language_switcher_locale | string | Locale code (e.g. it_IT); empty string = no override |
This plugin is ready for internationalization via .po/.mo files inside the languages/ folder.
Available languages:
- 🇬🇧 English (default)
- 🇮🇹 Italian (
it_IT)
Contributions for additional languages are welcome.
This plugin is licensed under the MIT License.
Lovingly developed by the usually-on-vacation brain cell of Gioxx.
Pull requests and feature suggestions are welcome!
If you find bugs or have feature requests, open an issue.
If you find it useful, leave a ⭐ on GitHub! ❤️