Preferred Languages

Описание

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.

Пожалуйста, помогайте нам тестировать этот плагин и сообщайте нам, если вы думаете, что что-то не работает так, как должно.

Комбинации клавиш

  • 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.

Примечание: для корректной работы сочетаний клавиш необходимо, чтобы интерфейс выбора предпочтительных языков был в фокусе.

Объединение переводов

Ранее загружался только первый доступный перевод для данной локали и домена.
Однако, если переводы неполные, некоторые строки могут отображаться на английском языке.
Это также ухудшает пользовательский опыт.

Чтобы этого избежать, функция «Предпочитаемые языки» теперь автоматически объединяет все неполные переводы в списке.

фильтр preferred_languages_merge_translations можно использовать для отказа от этого поведения.
Он предоставляет три параметра:

  1. $merge — Следует ли объединять переводы. По умолчанию — true.
  2. $domain — The text domain
  3. $current_locale — The current locale.

Примите участие

Активное развитие происходит в GitHub.

Если вы хотите принять участие, посетите список проблем и присоединитесь к #core-i18n в Slack. Если у вас ещё нет учетной записи Slack, вы можете подписаться на make.wordpress.org/chat/.

Скриншоты

Отзывы

25.05.2026
This is an excellent and very useful plugin. Must have!
18.01.2023 1 ответ
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.
20.03.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!!!
17.01.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.)
Посмотреть все 20 отзывов

Участники и разработчики

«Preferred Languages» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

«Preferred Languages» переведён на 34 языка. Благодарим переводчиков за их работу.

Перевести «Preferred Languages» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

Для просмотра журнала изменений, извольте перейти на репозиторий GitHub.