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!
It was resolved by upgrading to V1.2.1 of the plugin.
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.
>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:
I wonder how this can be committed into the official mailchimp codebase.
You’re welcome. Your modified source file doesn’t fix my problem, unfortunately. I’ve no idea where to look next.
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
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.
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.
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?
>So the only thing you’ve modified to make it work
>on feestdagen-belgie.be is embedded in the edited mailchimp.php file?
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! 🙂
Thanks, same to you.
PS Remember the caching of files on your webserver might give unpredictable results at times when files are being modified.
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:
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:
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.
define('WPLANG', 'nl_NL');is correct. ‘nl’ is not. ‘NL’ is not. ‘nl_nl’ is not.
- The topic ‘[Plugin: MailChimp List Subscribe Form] Wrong language in the Signup widget!’ is closed to new replies.