Skip Navigation

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

Problem:
How to translate WooCommerce Points & Rewards strings

Solution:
The solution is to add a xml file named wpml-config.xml file in the root of the plugin folder with this content:

<wpml-config>
  <admin-texts>
    <key name="wc_points_rewards_single_product_message"/>
    <key name="wc_points_rewards_earn_points_message"/>
    <key name="wc_points_rewards_redeem_points_message"/>
    <key name="wc_points_rewards_thank_you_message"/>
  </admin-texts>
</wpml-config>

Then once done, the strings will appear automatically in WPML String Translation, by saving settings in the plugin, but with 4 different domains names:

wc_points_rewards_single_product_message
wc_points_rewards_earn_points_message
wc_points_rewards_redeem_points_message
wc_points_rewards_thank_you_message

Also if the WPML default language is different than english, you will have to change the source language for those strings.

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 topic contains 2 replies, has 2 voices.

Last updated by loicd 3 years, 10 months ago.

Assigned support staff: Lauren.

Author Posts
June 19, 2017 at 11:29 am #1300939

loicd

All Other plugins seams working with WPML.

I have translated in string translation, this string…
- from English: "Complete your order and earn %s for a discount on a future purchase"
- to French: "Completer votre commande et gagner %s pour une remise sur un prochain achat"

But the translation dont appear in front end (in French language). I am still getting the english sentence.

URL of (my) website where problem appears (you need to add a product in the basket and to go to checkout ("commande"):
hidden link

I am used to WPML with WooCommerce… Is the first time that I use this
WooCommerce Points and Rewards plugin.

I have already tried a lot of different things (from other issues)…

Capture d’écran 2017-06-19 à 13.26.57.png
June 19, 2017 at 10:53 pm #1301456

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

Please take a look at this similar ticket: https://wpml.org/forums/topic/translate-woocommerce-points-rewards/

Can you please follow the steps in this ticket and let me know if the translations appear correct?

June 20, 2017 at 6:24 am #1301556

loicd

Ok this is solved now, but is not well explained, so that's why it was not working.

So yes the solution is to add a xml file named wpml-config.xml file in the root of the plugin folder with this content:

<wpml-config>
  <admin-texts>
    <key name="wc_points_rewards_single_product_message"/>
    <key name="wc_points_rewards_earn_points_message"/>
    <key name="wc_points_rewards_redeem_points_message"/>
    <key name="wc_points_rewards_thank_you_message"/>
  </admin-texts>
</wpml-config>

Then once done, no need to scan or rescan the plugin for string translations, as the strings will appear automatically in WPML String Translation, by saving settings in the plugin, but with 4 different domains names:

wc_points_rewards_single_product_message
wc_points_rewards_earn_points_message
wc_points_rewards_redeem_points_message
wc_points_rewards_thank_you_message

This strings are the right ones to be translated (and not with woocommerce-points-and-rewards domain name)…

Also if the WPML default language is different than english, you will have to change the source language for those strings.

Best regards and big thanks.

LOIC