How to Translate Checkout Fields with Polylang and WPML
Content
Translating custom checkout fields created with the 'Checkout Field Editor (Checkout Manager) for WooCommerce' plugin is a common challenge for multilingual sites. This guide explains the core issue and provides the most effective solutions based on community reports.
Why This Happens
The free version of the 'Checkout Field Editor' plugin does not natively integrate with popular multilingual plugins like WPML or Polylang. This means the text strings for your custom field labels, placeholders, and options are not automatically detected by these translation systems.
Common Solutions
1. For Polylang Users: Install a Helper Plugin
Many users have reported success by installing the free "Theme and plugin translation for Polylang (TTfP)" plugin. This plugin helps Polylang detect strings from themes and plugins that it might otherwise miss.
Steps:
- Install and activate the Theme and plugin translation for Polylang plugin.
- Go to Languages > Settings > TTfP settings in your WordPress admin.
- Ensure that "checkout-form-designer" or a similar plugin slug is selected for scanning.
- Go to Languages > String translation to find and translate your checkout field strings.
2. The Manual Translation File (.po/.mo) Method
This is the officially suggested method for the plugin's free version and works with any language. It involves creating translation files.
Steps:
- Use a translation tool like Poedit.
- Locate the plugin's `.pot` file (template) in the
/wp-content/plugins/woo-checkout-field-editor-pro/languages/directory. - Create a new translation for your language (e.g.,
fr_FR.pofor French). - Translate all the necessary strings (msgid) into your target language (msgstr).
- Save the file, which will generate a compiled
.mofile. Upload both the.poand.mofiles to the plugin's language directory.
Important Note: If a text string you need to translate (like "Billing Fields") is not in the original .pot file, you must manually add it using the correct format before translating:
msgid "Billing Fields"
msgstr ""
3. Using a Custom Code Snippet (For Developers)
For a small number of hard-to-translate strings, you can use a WordPress filter. This code snippet, added to your child theme's functions.php file, changes the text output.
//Change the 'Billing Fields' checkout label to 'Contact Information'
function wc_billing_field_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Billing Fields' :
$translated_text = __( 'Your Translated Text Here', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );
What Doesn't Work
- WPML String Translation: The free version of the checkout field editor is not compatible with WPML. Strings will not appear for translation in the WPML interface.
- Polylang Alone: Without the TTfP helper plugin, Polylang often cannot detect the field strings, so translations will not appear on the frontend.
Conclusion
For Polylang users, installing the "Theme and plugin translation for Polylang" plugin is the most straightforward solution. For other setups or if you prefer more control, creating manual .po and .mo translation files is the recommended approach. Always clear your cache after implementing any translation solution.
Related Support Threads Support
-
Polylang checkout field translation not workinghttps://wordpress.org/support/topic/polylang-checkout-field-translation-not-working-5/
-
Language based fields (show/hide on certain languages)https://wordpress.org/support/topic/language-based-fields-show-hide-on-certain-languages/
-
Is your plugin compatible with WPML or nothttps://wordpress.org/support/topic/is-your-plugin-compatible-with-wpml-or-not/
-
Question towards translations for labelshttps://wordpress.org/support/topic/question-towards-translations-for-labels/
-
Not working Display Rules with WPML pluginhttps://wordpress.org/support/topic/not-working-display-rules-with-wpml-plugin/
-
Block field “(optional)” not translatablehttps://wordpress.org/support/topic/block-field-optional-not-translatable/
-
Polylang checkout field translation not workinghttps://wordpress.org/support/topic/polylang-checkout-field-translation-not-working-2/
-
Translation of custom fields (Polylang?)https://wordpress.org/support/topic/translation-of-custom-fields-polylang-2/
-
Polylang translation not showinghttps://wordpress.org/support/topic/polylang-translation-not-showing/
-
Using Wpml name surname address no translatehttps://wordpress.org/support/topic/using-wpml-name-surname-address-no-translate/
-
Translate/rename Place order button?https://wordpress.org/support/topic/translate-rename-place-order-button/
-
Can’t translate fieldshttps://wordpress.org/support/topic/cant-translate-fields/
-
Translate placeholdershttps://wordpress.org/support/topic/translate-placeholders/
-
WPML translationhttps://wordpress.org/support/topic/wpml-translation-35/
-
Billing Fields (translate )https://wordpress.org/support/topic/billing-fields-translate/
-
Fields don’t translate in secondary languagehttps://wordpress.org/support/topic/fields-dont-translate-in-secondary-language/
-
Cannot translate fields using WPMLhttps://wordpress.org/support/topic/cannot-translate-fields-using-wpml/
-
Change order checkout fields for just one languagehttps://wordpress.org/support/topic/change-order-checkout-fields-for-just-one-language/
-
translations with wpmlhttps://wordpress.org/support/topic/translations-with-wpml-2/
-
Checkout Field Editor for WooCommerce with polylanghttps://wordpress.org/support/topic/checkout-field-editor-for-woocommerce-with-polylang/
-
WPML compatibilityhttps://wordpress.org/support/topic/wpml-compatibility-289/
-
WPML string translation not workinghttps://wordpress.org/support/topic/wpml-string-translation-not-working-3/
-
Translating fields with Polylanghttps://wordpress.org/support/topic/translating-fields-with-polylang/
-
Field for a certain languagehttps://wordpress.org/support/topic/field-for-a-certain-language/
-
Problems with text translations with Polylanghttps://wordpress.org/support/topic/problems-with-text-translations-with-polylang/
-
Polylang checkout field translation not workinghttps://wordpress.org/support/topic/polylang-checkout-field-translation-not-working/
-
Billing Fields (cannot be translated)https://wordpress.org/support/topic/billing-fields-cannot-be-translated/
-
Translating checkbox optionshttps://wordpress.org/support/topic/translating-checkbox-options/
-
WPML supporthttps://wordpress.org/support/topic/wpml-support-118/
-
Translation for multi-languagehttps://wordpress.org/support/topic/translation-for-multi-language/
-
Multi-Language Websitehttps://wordpress.org/support/topic/multi-language-website-14/
-
translate fields in wpmlhttps://wordpress.org/support/topic/translate-fields-in-wpml/
-
Some placeholder doesn’t show up correctlyhttps://wordpress.org/support/topic/some-placeholder-doesnt-show-up-correctly/
-
WPMLCompatibilityhttps://wordpress.org/support/topic/wpmlcompatibility-2/