WordPress.org

Ready to get started?Download WordPress

Forums

MailChimp List Subscribe Form
Wrong language in the Signup widget! (17 posts)

  1. pantaluna
    Member
    Posted 3 years ago #

    Hi,
    The Mailchimp Support team referred me to this forum.

    I have setup the website http://www.feestdagen-belgie.be/ and I use WordPress V2.9.2 and the latest version of the WordPress Mailchimp plugin.
    The WordPress is setup for the Dutch language [ define ('WPLANG', 'nl_NL'); ] and for example the admin section is shown in Dutch nicely.

    But I have noticed that the messages in the sidebar widget are shown in English, and not in Dutch as I want it.
    Notice the messages "required field" and "Success, you've been signed up! Please look for our confirmation email!"
    This is a screenshot.

    So somehow the messages in the sidebar are still in English.
    Please advise how to display those messages in Dutch please.

    Thanks for your help!

  2. Destillator
    Member
    Posted 3 years ago #

    Anyone? Exact the same problem here.

  3. pantaluna
    Member
    Posted 3 years ago #

    It was resolved by upgrading to V1.2.1 of the plugin.
    http://wordpress.org/extend/plugins/mailchimp/changelog/

  4. Destillator
    Member
    Posted 3 years ago #

    Nope, not for me. I've deleted and re-installed the plugin to be absolutely sure. When I look at your page http://www.feestdagen-belgie.be/ I see the english texts, too.

  5. pantaluna
    Member
    Posted 3 years ago #

    Hi,
    >When I look at your page http://www.feestdagen-belgie.be/
    >I see the english texts, too.
    One message of the three appears not to get translated. Thanks for that!
    1. Not OK: "You must fill in"
    2. OK: "That email address is already subscribed to the list"
    3. OK: "That email address is invalid"

    I digged into the source code and apparently the po-mo translation files are not in sync with the latest version of the source file(s).

    Therefore I have modified the php source file and now it is working for all 3 messages. The code change should work for all supported languages. I have deployed it on the website and all seems okay now.

    This is the modified source file:
    http://dl.dropbox.com/u/5629939/mailchimp.php

    I wonder how this can be committed into the official mailchimp codebase.

  6. Destillator
    Member
    Posted 3 years ago #

    You're welcome. Your modified source file doesn't fix my problem, unfortunately. I've no idea where to look next.

  7. pantaluna
    Member
    Posted 3 years ago #

    Can you lookup this value in the file wp-config.php"
    e.g. define ('WPLANG', 'nl_NL');

    And verify that a matching file exists in the folder /wp-content/plugins/mailchimp/po/ ?

    e.g. mailchimp_i18n-nl_NL.mo and mailchimp_i18n-nl_NL.po

  8. Destillator
    Member
    Posted 3 years ago #

    Thanks for the tips! Getting there... In wp-config.php the language was defined as "define ('WPLANG', 'nl');". Changing this to nl_NL seems to activate the matching language file. But now the same "You must fill in..." message does not get translated. The rest seems fine.

  9. pantaluna
    Member
    Posted 3 years ago #

    This is tricky.

    1. In WordPress Nederlands V2.9.x it should defined as
    define ('WPLANG', 'nl_NL');
    and in WordPress Nederlands V3.0.x it should be defined as
    define ('WPLANG', 'nl');

    So if you use WordPress V3.0 then you have to copy the files mailchimp_i18n-nl_NL.* to mailchimp_i18n-nl.*

    FYI http://www.feestdagen-belgie.be/ runs WP2.9.* but some other websites I made run V3.0.* - both okay now.

  10. Destillator
    Member
    Posted 3 years ago #

    Tricky indeed! I'm running WP3, so I've changed the language back to "nl" and copied the .mo and .po files to the corresponding version. This works fine, but the "You must fill in..." problem persists. So the only thing you've modified to make it work on feestdagen-belgie.be is embedded in the edited mailchimp.php file?

  11. pantaluna
    Member
    Posted 3 years ago #

    >So the only thing you've modified to make it work
    >on feestdagen-belgie.be is embedded in the edited mailchimp.php file?

    Yes.

  12. Destillator
    Member
    Posted 3 years ago #

    Ok, this is weird. I've replaced your version of the mailchimp.php file with the original one, and everything works fine. Thanks a bunch for your help, you've saved my day. The only thing left to do now is wish you a merry Christmas and a happy new year! :)

  13. pantaluna
    Member
    Posted 3 years ago #

    Thanks, same to you.

    PS Remember the caching of files on your webserver might give unpredictable results at times when files are being modified.

  14. mc_jesse
    Member
    Posted 3 years ago #

    It sounds like there were two separate issues here.

    One was that the Dutch translation for the "You must fill in" text was incorrect. That was solved over here:
    http://wordpress.org/support/topic/plugin-mailchimp-list-subscribe-form-translate-error-and-confirmation-message?replies=11#post-1842107

    and was fixable by grabbing the new languages files after I updated them. To be clear, the upgrade only fixed it for @pantalune b/c they installed it after I updated the files. Had they installed it prior to that, they would have had to reinstall 1.2.1 to get the files.

    The second is what the proper define('WPLANG', xxx) value should be. To preserve backwards compatibility and proper language support the proper thing to do in WP 3.0 should be to keep the language_COUNTRY format for the files. This plugin actually has a language the requires that - pt_BR (Portuguese in Brazil). What appear to be the current docs also show using the language_COUNTRY format:
    http://codex.wordpress.org/Editing_wp-config.php#Language_and_Language_Directory

    To investigate a bit further, I downloaded fresh copies of standard English WP from wordpress.org and the German version from de.wordpress.org. Interestingly, the German version still uses the language_COUNTRY format in the config and, of course, in the wp-content/languages directory. However, the English config does what @pantaluna says WP3 requires. Technically it doesn't require anything, it's just passing what you give it and expecting the files to be there. As I mentioned, though, for backwards compatibility it would be bad form to suggest that plugins developers either drop 2.x language support or maintain 2 copies of the language files. It also doesn't cover the pt_BR situation I mentioned above.

    I'm going to see if there's actually something official that defines how things should be setup since this could certainly use some clarity.

  15. Andrew Nacin
    Lead Developer
    Posted 3 years ago #

    define('WPLANG', 'nl_NL'); is correct. 'nl' is not. 'NL' is not. 'nl_nl' is not.

  16. Remkus de Vries
    Member
    Posted 3 years ago #

    We recently reverted back to nl_NL setting having used the nl settings from 3.0 to 3.0.2 so that may have been causing some confusion but Nacin is right.

  17. pantaluna
    Member
    Posted 3 years ago #

    Thanks Remkus. Everything is back to normal; great!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic