0

I have a multisite with Buddypress intended for two languages. Therefore I have translation files for each language, and this for the theme and for the plugins (nl_NL , fr_FR) in the folders languages_themes and languages_plugins.

Now I have created two user roles, namely Nl and FR.

If a user logs in with user role 'NL', the user should see the translated site from nl_NL and if the user logs in with 'FR', it should see fr_FR.

How can I achieve this?

Thanks a lot Erwin

6
  • What plugin / tool will you use to manage the content transplantations? - WPML, Polylang etc?
    – Q Studio
    Nov 20 '20 at 19:50
  • Hi there, I use Loco translate to translate all theme and plugin strings. Nov 20 '20 at 20:35
  • 1
    The plugin guides suggest to write a filter on the "locale" hook - localise.biz/wordpress/plugin/faqs/language-switch - this will need to be run from a plugin and you could use it to pull back user_meta data - such as the stored language value and define the locale to load WP in.
    – Q Studio
    Nov 20 '20 at 23:36
  • Hi, Apart from Loco, in the meantime I've found this. It does change the language of the theme, but not the plugins yet. I have provided each plugin with a language file with the same extension fr_FR. How could I also change the text strings of the plugins? codepile.net/pile/Vlk7PMlW Nov 22 '20 at 20:23
  • What plugins need translating - perhaps some do not come with the required language translations ( stored in po / mo files inside each ) - remember that WP does not enforce any specific language requirements and translation from English is optional and user-lead.
    – Q Studio
    Nov 23 '20 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.