Support » Plugin: WCM User Language Switcher » Plugin translation "myplugin-fr_FR.po" not working

  • Resolved robbiet63



    Great plugin! I just installed it on my multisite network and it is exactly what I’m looking for. There’s just one problem: it is not translating my plugin translation files. All other files translate just fine: e.g. files such as fr_FR.po/, admin-fr_FR.po/.mo, network-admin-fr_FR.po/.mo all translate.

    But files such as “myplugin-fr_FR.po” and “” are not being translated. These files were being translated prior to installing your plugin, using Settings >> General >> Language. But with WCM User Language Switcher (WCM ULS) they are no longer being translated.

    I am using the CodeStyling Localization plugin as well, but I deactivated this to see if there was a conflict and still got the same problem with WCM ULS. (


Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Franz Josef Kaiser


    Does this happen to other plugins in your install as well? And how exactly (in code) do you register your translation files? And do you have a link to your plugin?

    Good questions. I did find a plugin that has translation files and that is working correctly. (Most do not have translation files.)

    It looks from that like there something in my coding that would be the issue. I will review later this week when I have more time.

    For my plugin I am registering localization as:

    function myplugin_localization() {
         load_plugin_textdomain( 'myplugintextdomain', false, dirname( plugin_basename(__FILE__)) . '/languages/' );

    All text to be translated is wrapped in
    __('Text to translate','myplugintextdomain');
    _e('Text to translate','myplugintextdomain');

    My plugin does not have a link, but I would be happy to send you a login for a subsite.

    Also to note: the language for each template or subsite sets the default for my plugin’s language. Thus, for my French template-site, my plugin shows in French, and when I use WCM ULS it remains in French while all else changes. Similarly, for my English template-site, my plugin’s English version remains in English regardless of how WCM ULS is set. All subsites created from these templates then display the same behaviour.

    Plugin Author Stephen Harris


    Hi robbiet63. When are you calling myplugin_localization()? Also you mention you are dynamically setting the default language for each network site, can you post the code you are using to achieve that?

    Hi Stephen,

    I finally had some time today to look into this. I’m afraid it was my error – I was missing the action call. I’m sorry to take your time.

    Thanks very much,

    Plugin Author Franz Josef Kaiser


    Hi Robbiet63,

    glad to read you figured it out. If you like the plugin, we’d appreciate if you leave us a review.

    Thanks and have a nice weekend!


    Plugin Author Franz Josef Kaiser


    Thank you! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Plugin translation "myplugin-fr_FR.po" not working’ is closed to new replies.