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: How to use strings that are already translated on Loco Translate

Solution: You can export the strings from loco translate and import it using string translation.

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/string-translation/#import-export-po

This topic contains 6 replies, has 2 voices.

Last updated by davidN-51 2 months, 3 weeks ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
August 17, 2019 at 5:22 pm #4410533

davidN-51

Tell us what you are trying to do?

Hello. I have the 98% of my themes strings translated into French via Loco translate (I downloaded the .mo and .po files). This is great, but why does it then not show these translated strings in WPML "String Translation"?. If I find the string which is translated into French in Loco, in WPML it is not translated and just gives the default English.

Why is that? I did do a scan by going to "Themes and Plugins Localization" then selecting my theme and clickign the button "Scan selected theme for strings". But it did not bring in the French translations from Loco .po . mo files.

Is this because I selected "Translate themes and plugins using WPML's String Translation only (don't load .mo files)"? If that is the case, is there any downside to me now selecting "Translate themes and plugins using WPML's String Translation and always load .mo files as backup "? Would that fix it?

I could of course use Loco aswell as your plugin, but I am trying to reduce plugins so thought I could remove Loco translate.

August 19, 2019 at 10:10 am #4415083

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Welcome to WPML support. I'd be assisting you further on this issue.

Is this because I selected "Translate themes and plugins using WPML's String Translation only (don't load .mo files)"?

Yes, when this mode is enabled the mo file translations aren't picked at all.

is there any downside to me now selecting "Translate themes and plugins using WPML's String Translation and always load .mo files as backup "? Would that fix it?

Since the plugin will need to scan all .mo/.po files and load it in string translation, slightly performance will be low. But except this, there is not any other downside.

Please enable this option, scan the plugins/themes and let me know if this helps.

Thanks

August 19, 2019 at 4:35 pm #4417491

davidN-51

Thanks for your reply. Performance actually is a big issue as WPML is already heavy on the resources. My backend is much slower now we have WPML running and frontend is also slower.

Would it also work if I enable the option "Translate themes and plugins using WPML's String Translation and always load .mo files as backup ", then disable this feature and use "Translate themes and plugins using WPML's String Translation only (don't load .mo files)"?

If I did that, would all the strings which are already translated in Loco be automatically copied across to the WPML strings? I also would not have to load the .mo files each time.

Thanks for your help.

August 20, 2019 at 5:10 am #4420539

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

From the next version, the string translations performance will be hugely improved so at the moment you can use the option that I mentioned earlier and continue. More details: https://wpml.org/2019/08/wpml-4-3-beta-1-with-much-faster-string-translation/

Would it also work if I enable the option "Translate themes and plugins using WPML's String Translation and always load .mo files as backup ", then disable this feature and use "Translate themes and plugins using WPML's String Translation only (don't load .mo files)"?

No this will not work.

Alternatively, you can import the contents of the .po file in the string translation too, more details here: https://wpml.org/documentation/getting-started-guide/string-translation/#import-export-po

Let me know if this helps.

Thanks

August 23, 2019 at 8:48 am #4445481

davidN-51

That's great news! Thanks for the update. So once I do what you suggest (so that I can import the string translations from Loco), I can then disable Loco translate?

Well done on the update 🙂

August 23, 2019 at 10:14 am #4445879

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Yes, you can import it and disable the loco translate plugin.

Thanks

August 23, 2019 at 12:34 pm #4447163

davidN-51

My issue is resolved now. Thank you!