問題の概要
WPMLでYITH WooCommerce Mailchimpを使用する場合、サブスクリプションフォームのブロックまたはショートコードに設定されたテキスト(タイトル、ボタン、メッセージ)、ウィジェットの成功メッセージとプライバシーラベル、および登録フォームのニュースレターチェックボックスのラベルは、デフォルト言語のままになります。
回避策
- WPML設定カスタム XML 設定に移動し、以下のXMLを追加して保存します。
XML
<wpml-config> <shortcodes> <shortcode> <tag>yith_wcmc_subscription_form</tag> <attributes> <attribute>title</attribute> <attribute>submit_label</attribute> <attribute>success_message</attribute> <attribute>privacy_label</attribute> </attributes> </shortcode> </shortcodes> <admin-texts> <key name="yith_wcmc_widget_success_message" /> <key name="yith_wcmc_widget_privacy_label" /> <key name="yith_wcmc_register_subscription_checkbox_label" /> </admin-texts> </wpml-config>
- フォームを含むページを翻訳し、フォームテキストが翻訳対象になるようにします。
- WPML文字列翻訳でウィジェットと登録テキストを翻訳します。