Forums

[Plugin Subscribe to Comments] cannot change the language it-IT (7 posts)

  1. pensierocrea
    Member
    Posted 4 years ago #

    hi all,
    i'm new to WP
    inside wp-content\plugins\subscribe-to-comments\extras
    i've
    subscribe-to-comments-it_IT.mo
    subscribe-to-comments-it_IT.po

    i've correctly set up WP to work in Italian but this plugin currently appear in English.

    should i change some variable in the plugin files to choose my languages file?

    thank you

  2. rektorur
    Member
    Posted 4 years ago #

    Hi,

    I don't know if you solved your problem or not, so it is:

    "Users will need to put their translated MO file in the same directory as your plugin's PHP file, and name it domain-ll_CC.mo, where ll_CC is the name of their locale."

    So the .mo file must be next to the plugin's file, not into the extras directory.

    Bye,

    KLaci

  3. simontol
    Member
    Posted 3 years ago #

    Hi, I've created subscribe-to-comments-it_IT.po and .mo and put in the plugin folder (not in extras) but the translation don't work yet...

  4. Roger Theriault
    Member
    Posted 3 years ago #

    Make sure the paths in the .po file makes sense... they should be relative, not pointing to your hard disk.

    "X-Poedit-Basepath: .\n"

    and

    #: foo.php:71
    msgid "Hello World!"
    msgstr "Spiacente :-)"

    and in your plugin you'll need something like:

    // load language / localization file
    add_action('init','myuniqueplugin_init');
    function myuniqueplugin_init() {
    	// time to get any translations
    	load_plugin_textdomain( 'my-plugin-textdomain', false, dirname(plugin_basename(__FILE__)) );
    }

    and of course, in your wp-config.php:

    define ('WPLANG', 'it_IT');
  5. franganghi
    Member
    Posted 3 years ago #

    Same problem for me.
    I changed the .mo file name in any known way but it is not found by wp.

    How can i fix this problem?
    I need the plugin to be traslated.

    Thanks

  6. Roger Theriault
    Member
    Posted 3 years ago #

    @franganghi - if the plugin doesn't have the necessary code to load the translation (correctly written), or more importantly it doesn't have its output strings encased in the __() and _e() functions, then a translation file will not help. If you're the plugin author, then you should be able to correct those issues. If you're not the author, you may want to contact the author about enabling the plugin for translation.

  7. thomas2411
    Member
    Posted 3 years ago #

    You have to name it like this:
    subscribe-to-comments-pl_PL.mo

    where pl_PL is your language letters set in wordpress. Put it in lugins directory. Not in this plugin directory BUT all plugins directory.

Topic Closed

This topic has been closed to new replies.

About this Topic