Skip Navigation

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

Problem:
I created a notice using WPCode Lite in English, to be inserted on the website's header
The English string was found and translated to the French using WPML plugin, but only the English text shows in both languages.

Solution:
To make the translation of a string appear on your site, the following conditions have to be met:

- The text must be wrapped in gettext calls.
- It must have a textdomain argument.

Please make sure that the string added to your script meets the above conditions.

Relevant Documentation:
https://wpml.org/documentation/support/enabling-text-translation-for-themes-not-compatible-with-wpml/

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 nathalieC-7 1 year, 10 months ago.

Assisted by: Mohamed Sayed.

Author Posts
February 21, 2023 at 4:14 pm #13081205

nathalieC-7

Hi There,

I created a notice using WPCode Lite (Insert scripts to the header and footer), in English, to be inserted on the website's header inn both languages.
The english string was found and translated to the French using WPML plugin, but only the English text shows on both languages pages.

Actually I am working on DEV and here is the link to the website: hidden link

I am attaching related screenshots.

Thank you for your help,
amal

February 22, 2023 at 10:13 am #13087087

Mohamed Sayed

Hi Amal,
Thanks for contacting WPML support, I will be glad to help you.

To make the translation of a string appear on your site, the following conditions have to be met:

- The text must be wrapped in gettext calls.
- It must have a textdomain argument.

So please make sure that the string added to your script meets the above conditions. More details: https://wpml.org/documentation/support/enabling-text-translation-for-themes-not-compatible-with-wpml/

If that didn't help, kindly share the code snippet so I can check it.

Regards,
Mohamed

February 27, 2023 at 12:38 am #13118351

nathalieC-7

My issue is partially resolved now. Thank you!