WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe to Comments
Translation not working (9 posts)

  1. fxbenard
    Member
    Posted 2 years ago #

    Hi, i tried to translate the plugin but even with the right .mo file in the languages folder nothing is getting translated. The function text_domain doesn't work.

    Does someone get this plugin translated before to confirm my problem ?
    And if is there a way to fix it please ? thanks.

    http://wordpress.org/extend/plugins/subscribe-to-comments/

  2. acsnaterse
    Member
    Posted 1 year ago #

    Same issue here. Translations don't work

  3. fxbenard
    Member
    Posted 1 year ago #

    I founded the way to fix it.

    In subscribe-to-comments.php line 822 change the function with this

    function sg_subscribe_start() {
    global $sg_subscribe;

    if ( !$sg_subscribe ) {
    load_plugin_textdomain('subscribe-to-comments', false, basename( dirname( __FILE__ ) ) . '/languages' );
    $sg_subscribe = new sg_subscribe();
    }
    }

    Create a languages folder and put your translations inside

  4. acsnaterse
    Member
    Posted 1 year ago #

    Thanks.. This worked!

  5. fxbenard
    Member
    Posted 1 year ago #

    You're welcome, enjoy your plugin

  6. closemarketing
    Member
    Posted 1 year ago #

    Which name did you put it? I tried with es_ES.mo and subscribe-to-comments_es-ES.mo and it doesn't get it.

  7. fxbenard
    Member
    Posted 1 year ago #

    If you followed my instructions, in your "languages" folder sitting in the root of the plugin, your file should be called :

    subscribe-to-comments-es_ES.po and subscribe-to-comments-es_ES.mo and not
    subscribe-to-comments_es-ES.mo, beware of the order between - and _

    Enjoy

  8. closemarketing
    Member
    Posted 1 year ago #

    Yes, I understood.

    But, with /languages/subscribe-to-comments-es_ES.mo file it doesn't get the file.

  9. fxbenard
    Member
    Posted 1 year ago #

    I don't know what to say more, it's working fine on my site

    Did you changed that line :

    load_plugin_textdomain('subscribe-to-comments', false, basename( dirname( __FILE__ ) ) . '/languages' );

    The es_ES.po file is complete ?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags