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

Last updated by Willem-Siebe 1 month ago.

Assigned support staff: Riffaz.

Author Posts
September 8, 2019 at 12:38 pm #4531415

Willem-Siebe

Tell us what you are trying to do?

In Theme and plugins localization I setup this option: "Translate themes and plugins using WPML's String Translation and always load .mo files as backup".

Why does WPML not suggest the the most efficient localization option as mentioned in Getting Started Guide (see link below).

Is there any documentation that you are following?

https://wpml.org/documentation/getting-started-guide/theme-localization/

What is the link to your site?

Not online yet, using localhost trick to develop website.

September 8, 2019 at 1:02 pm #4531573

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for contacting WPML support.

How to translate strings in themes and plugins?
1. Translate themes and plugins using WPML's String Translation only (don't load .mo files)
2. Translate themes and plugins using WPML's String Translation and always load .mo files as backup
3. Don't use String Translation to translate themes and plugins.

Option #3 is a very rare case scenario that would probably not work for you.
Themes and sites that use a page builder should use String Translation to translate these strings and option #3 will bypass String Translation.

Let's say you are a theme like Divi which uses heavy page builder - so you probably need option #1 or #2

I would not recommend you option #2 as if not properly tuned - it will make your site to load twice the same data - once from the .mo files and once from WPML String Translation.
This is why I recommend you to use option #1 for the best experience and performance with WPML and WPML String Translation.

If you delete some strings, then they are again registered once are displayed - if the option for registering their domain/context is enabled in WPML > String Translation, or if it is not - then the domain/context .mo file is loaded instead and this may lead to performance issue.

So the best performance for your site (as almost all the themes have a builder now), you better choose the first option: Translate themes and plugins using WPML's String Translation only (don't load .mo files)

Please try this option and let me know if you have any more questions about this issue.

Thanks,
Itamar.

September 8, 2019 at 1:29 pm #4531679

Willem-Siebe

Hi, thanks for you information, but it's not an answer to my question. I know "Translate themes and plugins using WPML's String Translation and always load .mo files as backup" is not the best option. It's explained in the link I provided from the Getting Started Quide.

According to the same article, WPML should warn me that I'm not using the best option. I don't get this warning. So the question is:

"Why does WPML not suggest the the most efficient localization option as mentioned in Getting Started Guide (see link below)."

https://wpml.org/documentation/getting-started-guide/theme-localization/

September 9, 2019 at 11:47 am #4536735

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

This is the new default, so it won't show up in a latest versions of WPML as it is the default option.

You will see this message only if you have an older version (before 3.8) and updated to the latest version of WPML because older version's default is NOT Translate themes and plugins using WPML's String Translation only (don't load .mo files)
So when you update to a latest version system will detect that and showing up this message.

So this is something you don't have to worry about as you already have the latest WPML. 🙂

Regards,
Riffaz.

September 9, 2019 at 3:14 pm #4538477

Willem-Siebe

I don't worry, but the point I'm trying to make is that there is information in the getting started guide, that I don't experience in the plugin.

And why would you not implement that warning in newer versions of WPML. If I choose a other option than the default, it would be a good thing that WPML warns me that there is a better option available. Since this was mentioned in the Getting Starting Guide, I'm missing the warning...

So I suggest:
- updating the Getting Started Guide;
- or include the warning in newer versions of WPML when somebody chooses other option than the most optimal one.

September 10, 2019 at 7:06 am #4542343

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

You are right.

Please make the feature request here https://wpml.org/suggest-a-new-feature-for-wpml/ for this.
Our developers will consider changing the feature as you suggest when we receive enough request.

Regards,
Riffaz.

September 10, 2019 at 6:03 pm #4547959

Willem-Siebe

Have send the feature request.

September 12, 2019 at 8:19 pm #4564287

Willem-Siebe

Response on my feature request:

"Hi Willem,

Your comment makes sense. In fact, this option is going away completely from WPML's GUI. In the upcoming release of WPML (version 4.3), there will be a completely new String Translation, which isn't asking this question anymore. The String Translation will work completely differently with .mo files, running much faster and requiring less configuration.

You can read the relevant announcements here:
https://wpml.org/2019/08/wpml-4-3-beta-1-with-much-faster-string-translation/

and from today:
https://wpml.org/2019/09/wpml-4-3-0-beta-with-faster-string-translation-and-multisite/

Does this help?

Amir"