• Nos2013

    (@nos2013)


    Hi,

    In my site, user can change language ( $locale ) when he click on a button.
    It reload the site with the new language.
    If i can change the language theme with this in index.php for example:
    $localelang = get_locale();
    load_default_textdomain();
    load_textdomain($localelang, WP_LANG_DIR.’/’.$localelang.’.mo’);

    I tried to do the same thing after for my plugins and it doesn’t work.
    How to properly change the text domain of a plugin when it already loaded ?
    I don’t want to use an external plugin to do this. I would like to know how to do this programmatically.

    Thank you,

    Nos2013

The topic ‘Load another .mo file after user changed language’ is closed to new replies.