Preferred Languages

Plugin Banner

Preferred Languages

by Pascal Birchler

Download
Description

Thanks to language packs it’s easier than ever before to change the main language of your site.
However, in some cases a single locale is not enough. When WordPress can’t find a translation for the active locale, it falls back to the original English strings.
That’s a poor user experience for many non-English speakers.

This feature project aims to change that by letting users choose multiple languages for displaying WordPress in.
That way you can set some sort of “fallback chain” where WordPress tries to load translations in your preferred order.

Please help us test this plugin and let us know if something is not working as you think it should.

Keyboard Shortcuts

  • Arrow Up: Move selected locale one position up.
  • Arrow Down: Move selected locale one position down.
  • Home: Select first locale in the list.
  • End: Select last locale in the list.
  • Backspace/Delete: remove the selected locale from the list.
  • Alt+A: Add the current locale from the dropdown to the list.

Note: the Preferred Languages UI needs to be focused in order for the keyboard shortcuts to work.

Merging Translations

Previously, only the first available translation for a given locale and domain will be loaded.
However, when translations are incomplete, some strings might still be displayed in English.
That’s a poor user experience as well.

To prevent this, Preferred Languages now automatically merges all incomplete translations in the list.

the preferred_languages_merge_translations filter can be used to opt out of this behavior.
It provides three parameters:

  1. $merge – Whether translations should be merged. Defaults to true.
  2. $domain – The text domain
  3. $current_locale – The current locale.

Get Involved

Active development is taking place on GitHub.

If you want to get involved, check out open issues and join the #core-i18n channel on Slack. If you don’t have a Slack account yet, you can sign up at make.wordpress.org/chat/.

  1. The new language section in 'Settings' -> 'General'

    The new language section in 'Settings' -> 'General'

  2. The new language section in your user profile.

    The new language section in your user profile.

deja de usar solo Es_es y Es_mx, ES_ar...

By evZek on March 21, 2023

Es un plugin, imprescindible en cualquier instalación fuera del inglés.

Should be in the core!

By David Perez (davidperez) on February 20, 2023

Awesome plugin!

Make this a core feature

By Pieterjan Deneys (NekoJonez) on January 18, 2023

I honestly think that this should be a core feature of WP.

The only thing wrong I notice is that when you are looking at the front end... The language of the admin bar changes into the site language but that's the only issue I have with this plugin at the time of writing. For the rest, it's a dream plugin.

awesome-plugin: from me 5 stars (i would give even more if it would be possible)

By tangermaroc on March 20, 2021

a very cool plugin. this is a truely great plugin, You can use it for many purposes. It works great right out of the box, but is very easy to customize to suit your needs. my current use-case: i use this plugin to power up my page - which has visitors from several european Countries. I’m using this plugin to manage a small job-site: And i have to say: I love this plugin. And if it comes to support: it is so awesome to see that all is documented so well and good: You can do so much with this plugin: if you need to customize it towards your special use-case: just look at the documentation (and again have a look at the docs) Read those instructions – they are written so well, people. There’s a lot of detail there and alltogehter i have to say: it’s super well documented! Amazing job: i love this plugin, from me 5 stars - (i would give even more if it would be possible) keep up this awesome and outstanding job - it rocks!!!

Very necessary in core

By capbussat on January 17, 2022

I think this should be in Core for websites with several possible languages. I like it very much! Specially I appreciate that each user can also choose languages from the selected languages. (I am developing a translation plugin for my own needs to use Google Translate to translate posts/pages and complement it.)

Should be in core

By strarsis on August 26, 2020

An indispensable plugin for sites that use a language with formal/non-formal variant. This should become a WordPress core functionality!

Fantastic

By Michael Turner (michaellturnr) on July 15, 2020

Its works fine for me. Very cool plugin

Awesome, Saved my day!

By Erik Molenaar (erikmolenaar) on October 17, 2019

Sometimes you stumble across plugins and wonder: why is this stuff not in core? I think because languages which have both informal and formal speech are a minority. Either way, this plugin saved my day. Thanks!

In core, please

By Thomas Maier (webzunft) on June 15, 2019

Thanks for Pascal to solve the problem of fallback languages. It is time to add it to the core and would show that WordPress is thinking globally.

Awesome

By Andrew (ionew) on June 7, 2019

This is so nice, thank you!

For the plugin’s changelog, please head over to the GitHub repository.

Back to top