WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Can't add new translation

[Resolved] Can't add new translation

  • katazina
    Member

    @katazina

    I found what’s causing the problem.

    In the simple-image-widget.php, line 64
    you forgot to put a / before the ‘languages/’

    this is how it should be:
    load_plugin_textdomain( ‘simple-image-widget’, false, dirname( plugin_basename( __FILE__ ) ) . ‘/languages/’ );

    Apart from that, thanks the plugin.

    http://wordpress.org/plugins/simple-image-widget/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Brady Vercher
    Participant

    @bradyvercher

    Hi katazina,

    Thanks for letting me know about the issue. I’ve updated the code on GitHub. Let me know if this looks like it’ll help and I can release it here as well.

    Cheers,
    Brady

    katazina
    Member

    @katazina

    Hi,

    modify the load_textdomain line to this:
    load_textdomain( ‘simple-image-widget’, WP_LANG_DIR . ‘/simple-image-widget/simple-image-widget-‘ . $locale . ‘.mo’ );

    I don’t know why, but it needs the plugin name and the “-“
    If it is in, then it will be working.

    Plugin Author Brady Vercher
    Participant

    @bradyvercher

    If you’re using the version from GitHub, just change the name of your translation file to remove the plugin name and dash and everything will work.

    While testing, I realized that the widget was loading before the text domain, so the name and description weren’t being filtered. The latest update fixes that issue as well.

    – Brady

    Sorry for the late answer, it’s ok 🙂 Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Can't add new translation’ is closed to new replies.