Skip to content Skip to sidebar

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

Problem:

Can't translate Shipping option "Flat Rate"

Solution:

1- Go to WPML-> Settings-> Custom XML tab
2- Add the following code

<wpml-config>
  <admin-texts>
    <key name="woocommerce_flat_rate_2_settings">
      <key name="title"></key>
    </key>
    <key name="woocommerce_free_shipping_1_settings">
      <key name="title"></key>
    </key>
  </admin-texts>
</wpml-config>

3- Go to WooCommerce-> Settings-> Shipping zones
4- Edit each shipping zone and resave it
5- Go to WPML-> String Translation and translate them
6- Check the checkout page on the front end

Kindly let me know if the above steps helped you fix the issue.

Relevant Documentation:
1) https://wpml.org/documentation/support/language-configuration-files/

2) https://wpml.org/documentation/support/language-configuration-files/#admin-texts

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.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by sanderK-22 2 years, 4 months ago.

Assisted by: Osama Mersal.

Author Posts
April 2, 2023 at 7:49 pm #13385535

sanderK-22

Hello

I would like to translate shipping option Standard Shipping. It is WooCommerce basic shipping option with name "Flat Rate". I changed it to Standard Shipping and now I am translating it to German language also but translated text won't show.

I used String Translations and was able to find the text and translate it but translated text won't show up.

Just in case I cleaned the brwoser cache and also WordPress plugin cache but it didn't change it.

Could you please help me with this issue.

Best Regards

wont show up.jpg
string t..jpg
April 3, 2023 at 10:04 am #13388639

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

Please login to this sandbox site and try to replicate the issue. (hidden link)

If the issue is replicable, please let me know how to reproduce it.

Best regards,
Osama

April 5, 2023 at 4:52 pm #13412531

sanderK-22

Hello

Sorry for the late reply. I did the flowwowing steps but the resut was the same – I wasen’t able to get the translated text to work.

1) Installed Porto Theme and content demo shop 38
2) WooCommerce > Settings >Shipping > Shipping zones > United States (US) > Add shipping method > Flat Rate > Add shipping method
3) Flat rate > Edit > Method title change from „Flat Rate“ to „Standard Shipping“ > Save changes
4) WPML > Theme and plugins localization > WooCommerce
5) WPML > String translation > Search „Standard Shipping“ and found it.
It was following sting:
admin_texts_woocommerce_shipping
flat_rate2_shipping_method_title

6) Translated „Standard Shipping“ to „Standard Shipping translated“
7) Then went to translated version of Checkout page but the translation was still in the English language and it was not changed.

Best Regards

Standard Shipping not translated.png
Screenshot (393).png
April 5, 2023 at 5:17 pm #13412809

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for replicating the issue. I checked the issue and was able to fix it by registering the admin string using XML. Kindly check the following steps:

1- Go to WPML-> Settings-> Custom XML tab
2- Add the following code

<wpml-config>
  <admin-texts>
    <key name="woocommerce_flat_rate_2_settings">
      <key name="title" />
    </key>
    <key name="woocommerce_free_shipping_1_settings">
      <key name="title" />
    </key>
  </admin-texts>
</wpml-config>

3- Go to WooCommerce-> Settings-> Shipping zones
4- Edit each shipping zone and resave it
5- Go to WPML-> String Translation and translate them (hidden link.)
6- Check the checkout page on the front end (hidden link)

Kindly let me know if the above steps helped you fix the issue.

Please check our guide about registering admin text. (https://wpml.org/documentation/support/language-configuration-files/#admin-texts)

Best regards,
Osama

1.jpg
April 5, 2023 at 5:45 pm #13413215

sanderK-22

Hello

Do you want me to do these steps in sandbox?

Best Regards

April 5, 2023 at 5:50 pm #13413227

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

I did the steps on the sandbox; please check if they work correctly. If everything works as expected, please apply the steps on your site.

Kind regards,
Osama

April 5, 2023 at 8:51 pm #13414093
sanderK-22

Hello

I was able to get translations to work without registering the admin string using XML.
I just did this: „Edit each shipping zone and resave it“. I did this to every shipping zone.
This generated the strings and then I was able to find it with string translations and translate them.
After that I checked and saw that translations were successful.

But now I have one more problem:
I can't find a way to translate these text in a checkout page
"Choose a Pickup Point" and " Show Pickup Points"

Best Regards

New threads created by Osama Mersal and linked to this one are listed below:

https://wpml.org/forums/topic/split-cant-translate-shipping-option-flat-rate/

1.jpg
April 5, 2023 at 8:59 pm #13414143

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

It's great to hear that the shipping zones are translated. 🙂

In our forum, we try to keep one issue per ticket. Continuing with one ticket per issue helps supporters focus on one issue at once and enables other users to find solutions to their questions faster.

Therefore, I've split the other ticket and created a new ticket with this issue. (https://wpml.org/forums/topic/split-cant-translate-shipping-option-flat-rate/)

Thanks for your understanding

Best regards,
Osama