Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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

Last updated by John-Pierre Cornelissen 1 year, 6 months ago.

Assigned support staff: Diego Pereira.

Author Posts
August 9, 2018 at 3:53 pm #2629811

John-Pierre Cornelissen

Hi,

I have this website of 7 pages in 4 languages, so 28 pages in total.

When I go to settings » Translate Link Targets, and run that option, it has to scan 59.270 strings and that takes very very long.
1) Where do all these strings come from, it's just 28 pages!
2) Why does it take so long? I started the scanning, it's now 30 minutes later and it didn't even finish scanning 1/3 of the strings. Meaning it's going to take over 1.5 hours to scan a 28 page website. I can only imagine what the performance going to be on a much bigger website with a lot of blog posts.
3) I think it's better if that option would be on the Translation Management page. It's now on the settings page, but I expect it to be where translations happen. I keep on searching for this option in the wrong place.

Thanks
JP

August 9, 2018 at 4:59 pm #2630140

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @John-Pierre Cornelissen, welcome to the WPML support Forum!

1) A new database entry is created with each new translation. So if your site has 28 pages in the original language, however each of these pages have translations for two languages, in fact they will be 28 x 3 = 84 pages. This also depends on the content within those pages.

2) It depends on many factors such as server performance, database size, amount of content, active plugins, etc.

3) Thanks for your suggestion, i will forward to our development team. The settings page was previously part of Translation management, but was moved in version 4.0 to add more WPML settings.

If you need more help just let me know.

All the best,
Diego

August 9, 2018 at 5:31 pm #2630224

John-Pierre Cornelissen

Hi Diego,

Thank you for your quick reply.

Regarding 1
The site has 7 pages x 4 language is 28 pages in total, not 84.
And 28 is still a whole lot less then 59.270 strings. What are these strings that need to be scanned? 59270 / 28 pages = 2.116 per page on average.

Does it scan ALL strings from all domains, including those from plugins and the theme? The string translation option already lists 20.489 strings.

I have a WPML test site with only 3 pages and 2 translated, so a total of 5 pages. Updating the link targets has to scan 11.094 strings. The string translation option lists 14.206 strings.

It doesn't make sense that if a websites has a handful of pages, it needs to scan tens of thousands of strings taking more then an hour to see which link targets needs to be updated. To me that looks like there is something wrong.

Regarding 2
Ok, I understand the technical part. Let's focus on the excessive amount of strings that need to be scanned first.

Regarding 3
Thanks.

JP

August 9, 2018 at 7:48 pm #2630849

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

It also check the strings in the themes, plugins and on wp_options table (usually used for theme and plugin options). This is also the reason for the large number of strings. If you are using a page builder, the translation editor also saves the elements as strings.

If you need more help just let me know.

Regards,
Diego

August 10, 2018 at 9:36 am #2633201

John-Pierre Cornelissen

Thanks, but it still doesn't make any sense to me that there are so many strings that need to be scanned.

I looked a bit closer
- The original site I mentioned had to scan 59.270 strings while the string translation option for themes and plugins contains 20.489 strings (so less then the scan total)
- As WPML test website had to scan 11.094 strings while the string translation option lists 14.206 strings (so more then the scan total)
- From the WPML test website I deleted the 2 translated pages, even from the recycle bin, meaning there are no translated pages left. Then I started the Translate Link Targets option again and it has to scan 11.131 strings. That's 11.131 - 11.094 = 37 more strings then before I deleted the translated pages. I would expect it to be less.

I think WPML scans way more strings then it has to and think that's really something that needs to be looked into to improve it's performance.

I understand this is not an immediate issue, but would appreciate if this could end up on the lists for future improvements.

Thanks
JP

August 10, 2018 at 2:23 pm #2634345

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello JP,

Thanks for your suggestion, we are always looking for ways to improve our plugins. I will forward it to our development team.

The function of this option is to completely scan WordPress, without missing a string. It scans all page details, translations, themes, plugins, the WP_options table and even WP's own strings. That's why the large amount of strings.

It was made to be used only a few times. When plugins are properly configured (especially page builders), most of the links are already automatically translated into the page update. Therefore it is not necessary to run this function every time. If you need to use it again with each new post, probably some configuration is missing. We can help you in this case.

Regards,
Diego

August 10, 2018 at 3:40 pm #2634502

John-Pierre Cornelissen

Ok thank you for explaining. I'll keep an eye on it with the next translation.