• Resolved midrocket

    (@midrocket)


    Hi!

    First of all, congratulations for this awesome translation plugin, is great!

    We are having trouble in a website where we have translated a plugin.

    Some strings translations load correctly when the .po file location is set up to custom -languages/loco/plugins/tourmaster-es_ES.po

    However, there are many others that only load when we change the .po location to system -languages/plugins/tourmaster-es_ES.po

    Any solution to make it work in the custom location? We need it like this because we dont want to loose translations during wordpress system updates.

    Thank you very much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tim W

    (@timwhitlock)

    The most common cause is translations being requested before Loco Translate has been allowed to start up.

    All the advice I can give is in the FAQ: Why don’t translations load from the custom folder?

    Thread Starter midrocket

    (@midrocket)

    Hi Tim, thanks for your quick response.

    I’ve tried everything in the tutorial but it still doesnt work:

    1. I moved in to system languages -> languages/plugins/tourmaster-es_ES.mo -> It works

    2. I moved back the file to languages/loco/plugins/tourmaster-es_ES.mo -> Doesnt work

    3. I’ve checked the plugin functions and it uses the load_plugin_textdomain function -> Doesnt work

    // load text domain for localization
    add_action(‘init’, ‘tourmaster_load_textdomain’);
    if( !function_exists(‘tourmaster_load_textdomain’) ){
    function tourmaster_load_textdomain() {
    load_plugin_textdomain(‘tourmaster’, false, plugin_basename(dirname(__FILE__)) . ‘/languages’);
    }
    }

    4. I have uploaded the file loco-loader.php into the folder wp-content/mu-plugins -> Doesnt work

    Plugin Author Tim W

    (@timwhitlock)

    As I wrote previously – all the advice I can give is in the FAQ.

    If you can’t make it work you’ll have to keep your files in the system location and take measures to ensure they’re not touched by WordPress updates. From the last paragraph of the FAQ …

    If you’re unable to use the custom folder, we suggest you take steps to protect your files in the standard locations instead. Disabling translation updates should make the “System” folder safe, see FAQ on disappearing files.

    Thread Starter midrocket

    (@midrocket)

    Ok thank you Tim, we will continue trying.

    Thread Starter midrocket

    (@midrocket)

    Hi again Tim, after testing different solutions, I found out that the translations are working correctly (in custom folder) in front side but not in admin. I didn’t noticed it until now because the translations I need are when editing a post in admin page. Makes this any sense to you? Thank you and sorry for the inconvenience

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin translation only showing when .po location is set to system’ is closed to new replies.