WordPress.org

Ready to get started?Download WordPress

Forums

Simple Image Widget
[resolved] Can't add new translation (5 posts)

  1. katazina
    Member
    Posted 10 months ago #

    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/

  2. Brady Vercher
    Member
    Plugin Author

    Posted 10 months ago #

    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

  3. katazina
    Member
    Posted 9 months ago #

    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.

  4. Brady Vercher
    Member
    Plugin Author

    Posted 9 months ago #

    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

  5. katazina
    Member
    Posted 6 months ago #

    Sorry for the late answer, it's ok :) Thanks

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.