WordPress.org

Ready to get started?Download WordPress

Forums

Loco Translate
[resolved] I translated the plugin, but the language does not change (4 posts)

  1. Ermatel
    Member
    Posted 2 months ago #

    Plugin https://wordpress.org/plugins/bft-autoresponder/

    in bft-autoresponder.php

    // initialize plugin
    function bft_init() {
    	global $wpdb;
    	$wpdb->show_errors=true;
    	load_plugin_textdomain( 'broadfast', false, BFT_RELATIVE_PATH."/languages/" );

    in wp-config.php
    define('WPLANG', 'ru_RU');
    after translating I have 2 files:
    bft-autoresponder-ru_RU.mo
    bft-autoresponder-ru_RU.po
    I put both to /plugin/bft-autoresponder/languages/
    But the language does not change.
    What I need to do?

    https://wordpress.org/plugins/loco-translate/

  2. Ermatel
    Member
    Posted 2 months ago #

    I also translated the LOCO into Russian. All is OK and works fine.
    If you need a translation (83%) I will send it to you.

  3. timwhitlock
    Member
    Plugin Author

    Posted 2 months ago #

    The bft-autoresponder plugin doesn't have its text domain declared, so Loco cannot guess that it wants to use "broadfast" when everything else about the plugin suggests it will be "bft-autoresponder".

    The POT file should really be named after the text domain that will be used, i.e. "broadfast.pot" but the plugin header "Text Domain: broadfast" could be added and Loco would have ready that. However, it's better practice if possible to use the plugin's name as the text domain to avoid conflicts with other plugins.

    To get it to work without editing the plugin, just rename "bft-autoresponder.mo" to "broadfast.mo" and you will see the translations. Of course you'll have to keep doing this, so I suggest adding the "Text Domain: broadfast" into the plugin comment header (and asking the author to do the same for their next version)

    Thanks for the offer of Russian translations. If you email them to support-wp at localise.biz I will gladly use them and give you a credit.

  4. Ermatel
    Member
    Posted 2 months ago #

    Thanks, it works!

Reply

You must log in to post.

About this Plugin

About this Topic