MailChimp-Widget icon indicating copy to clipboard operation
MailChimp-Widget copied to clipboard

Different language versions of confirmation / error message

Open pontifex-maximus opened this issue 11 years ago • 0 comments

Hi, I run this widget on a bilingual multisite and I am trying to figure out how to solve some language issues. The plugin enables to customize the “send” button, confirmation and error message in the widget menu which is different for each site. However, “Last name” and “First name” can be adjusted only at the level of the plugin file itself, which is just one for the both sites. The same holds for an additional sentence (“Would you like to receive your newsletter?”) that I also need in two language versions.

So I adjusted ns_widget_mailchimp.class.php to get customizable first and last name and “call for action” message. The plugin created different database entries and everything looked fine… until I subscribed to my mail-list. The confirmation and the error message is just one (the one for the main site), even though the different message for the sub-site is correctly set in the widget menu and stored in the database.

It is probably in this part of the code:

private function get_failure_message ($number = null) {
    $options = get_option($this->option_name);
    return $options[$number]['failure_message'];
}

The sub-site catches the value of “failure_message” in the main site options (in WP_options instead of in WP_2_options). You can see it here: http://www.labanbratislava.sk/en. After subscription, the confirmation / error message appears in Slovak, not in English.

Thanks in advance for your time and suggestions. It is beyond my capacities, although I already learnt quite lot by playing with the code this night :-)

pontifex-maximus avatar Mar 05 '13 01:03 pontifex-maximus