This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem:
User was unable to translate checkout fields from primary language to secondary language(english)
Solution:
The fields are defined by WooCommerce Checkout Fileds Editor, and were registered as plugin options as english.
After activating the fields using xml configuration, we had to change language for strings in ST and translate to english

<wpml-config>
    <admin-texts>
         <key name="wc_fields_billing">
            <key name="*">
                <key name="label" />
            </key>
        </key>
    </admin-texts>
</wpml-config>

Relevant Documentation:
https://wpml.org/documentation/getting-started-guide/translating-theme-options/
https://wpml.org/documentation/support/language-configuration-files/
https://wpml.org/documentation/support/language-configuration-files/overriding-language-configuration-files/

This topic contains 5 replies, has 2 voices.

Last updated by joostd-4 6 months ago.

Assigned support staff: Jamal.

Author Posts
April 19, 2019 at 8:42 am #3644155

joostd-4

Hi, one thing remains: for some reason the field labels in the English version of the checkout form won't translate. All the rest of the page is translated, though! see hidden link

Any ideas? Thanks in advance!

April 19, 2019 at 9:14 am #3644375

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for contacting WPML Support. I will be glad to help with this.

According to your debug info, you are using the WooCommerce Checkout Fields Editor plugin. I guess you have already entered fields in primary language and now you need to translate them to english! If it is not the case please elaborate more on the subject.
If it is the case, the plugin stores the fields as theme options. You either translate through admin strings in WPML->String translation or using this code in WPML->Settings->Custom XML Configuration.

<wpml-config>
    <admin-texts>
         <key name="wc_fields_billing">
            <key name="*">
                <key name="label" />
            </key>
        </key>
    </admin-texts>
</wpml-config>

Relevant Documentation:
https://wpml.org/documentation/getting-started-guide/translating-theme-options/
https://wpml.org/documentation/support/language-configuration-files/
https://wpml.org/documentation/support/language-configuration-files/overriding-language-configuration-files/

Let me know if this helps.

Best regards,
Jamal
WPML Support

April 19, 2019 at 9:24 am #3644457

joostd-4

Hi Jamal, thanks for your quick reply. The weird thing is, I can't seem to find the checkout fields editor strings in the string translation.....?

April 19, 2019 at 9:41 am #3644577

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi,

I would like to access the admin area of your site for further checking. Please fill the private details fields after a full site backup. Check the following links for more details about our private information sharing policies.

hidden link

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Best regards,
Jamal

April 19, 2019 at 11:20 am #3645299

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thanks for the access. I added the above code to WPML->Settings->Custom XML Configuration. And the fields were available in WPML->String Translation. See attached images.
Then i had to change their language to Dutch. Once you translate the strings they will be reflected in the frontend. I already tested with "Phone" fields.

Let me know if you still need assistance with this issue.

Best regards,
Jamal

April 19, 2019 at 12:26 pm #3645717

joostd-4

Hi Jamal

Great!! that worked like a charm. Thanks for your help and have a nice day!