diff --git a/includes/forms/class-form.php b/includes/forms/class-form.php index 76a0b30f..11995a38 100755 --- a/includes/forms/class-form.php +++ b/includes/forms/class-form.php @@ -296,7 +296,8 @@ protected function load_messages(array $post_meta = []) $message_text = $post_meta[ 'text_' . $key ][0]; } - $messages[ $key ] = $message_text; + // run final value through gettext filter to allow translation of stored setting values + $messages[ $key ] = __($message_text, 'mailchimp-for-wp'); } return $messages; diff --git a/includes/integrations/class-integration.php b/includes/integrations/class-integration.php index 1f2edfcc..91c9e08e 100755 --- a/includes/integrations/class-integration.php +++ b/includes/integrations/class-integration.php @@ -175,6 +175,11 @@ public function get_label_text() $label = $default_options['label']; } + // run saved value through gettext filter + // this allows people to use a plugin like Loco Translate to translate this message + // without updating the setting itself + $label = __($label, 'mailchimp-for-wp'); + /** * Filters the checkbox label *