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: The word count is wrong when the page contains a shortcode that pulls in content.

Solution: WPML has a built-in word count tool. It estimates the number of words in the document based on all translatable strings. This includes texts imported by the shortcodes.

However, this is only an estimate. You will get the final estimate when you send the document to the translation service as each translation service will have a different pricing mechanism.

You will not be charged for duplicated content of the shortcodes.

Read more about getting a website word count for your WordPress site.

This topic contains 9 replies, has 3 voices.

Last updated by agnesL 1 year, 7 months ago.

Assigned support staff: Cristina.

Author Posts
February 20, 2018 at 1:16 pm #1523588

John-Pierre Cornelissen

I am trying to:
I was looking at the number of words to get the content translated and found that the word count is completely wrong when the page contains a shortcode that pulls in content.

Link to a page where the issue can be seen:
hidden link

I expected to see:
1115 words

Instead, I got:
1505 words (screen shot)

If you look at the page, everything from the restaurant menu is pulled in by a shortcode. That content is translated in their own post typed.

I think the word count should exclude content that is pulled in by a shortcode.

Thanks
JP

February 21, 2018 at 11:41 am #1524782

Cristina

Hello John-Pierre,

If understand you correctly, the counter shows more words than needed because it is counting the imported words of the shortcode that already have been translated in a separate post.

I suppose the menus are custom post types. Maybe this is a problem.

This is a situation I have to escalate to my developer colleagues to check the case.

In order to understand the issue better and to have a test case for the developers, I have a few more questions:

Is the content of this shortcode content appearing on the XLIFF file or in the Translation Editor as translatable text and set to be translated or does the shortcode content not appear in the translation mask?

Does it appear already translated or are the fields empty?

I am enabling a private reply box for you, where you can paste access data that only you and the support will see.

If you agree, I would like to use a snapshot of the site to check this or a copy of the theme to test the behaviour on a clean setup.

You can paste a duplicator file or just the zip file of the theme for this in the corresponding fields in the reply box. Please fill in dummy data for all unused fields.

Kind regards,

Cristina

February 21, 2018 at 11:57 am #1524796

John-Pierre Cornelissen

Hi Crisina,

Yes, that's indeed the problem. Yes menu's and the menu items are custom post types that are separately translated.

I have already sent the translation jobs to icanlocalize so I can't create exports anymore. I think these exports are ok though, because the word count in the ICL project is much lower then in WPML.

It is not a big issue for me now, but it would be nice if this can be fixed in a future version. Especially if I don't use ICL and need to get quotes from other translators. Their quote is usually based on the word count, so it's going to be an issue if I let them quote on e.g. 5000 words while they'll get 4000 in an export and then increase their price.

Do you have enough info to send to a developer? I assume it'll be very easy for them to reproduce with a simple shortcode.

February 26, 2018 at 9:07 am #1528868

Cristina

Hello John-Pierre,

I have been researching on this, and it seems to be that WPML estimates in the Translation Management Dashboard how many words are in the document based on everything that can be translated, including the imported texts by the shortcodes.

But this is not final word count that you will get charged for from the translation service.

You will get a real estimate when you send the document to the translation service as each translation service will have a different pricing mechanism. Therefore, the Translation Management word count is just an estimate.

You should get the real estimation quote in the Translation Service admin panel when the content is delivered and you have sent the document to the translation service.

Therefore, the Translation Management word count is just an approximate value to estimate the cost of your site’s content translation.

You will not be charged for duplicated content of the shortcodes.

Kind regards,
Cristina

February 26, 2018 at 11:44 am #1529060

John-Pierre Cornelissen

Hi Cristina,

Thank you for your reply. Is there a way to submit this as a change request?

I indeed found that after submitting it to icanlocalize, they calculated the lower number of words. Problem is, if I want to work with a local translator and ask for a quote, I need to go with the word count that is given by WPML. I think there must be a way to exclude the content that is pulled in by a shortcode.

Thanks
JP

February 28, 2018 at 11:45 am #1531663

Cristina

Hello John-Pierre,

I have added this feature request to an existing similar request.

This request had been considered and postponed due to other priorities and due to a bigger revamp for the translation management part of WPML. Right now I can't give you any dates about this being implemented and in which way.

Kind regards,
Cristina

February 28, 2018 at 12:54 pm #1531762

John-Pierre Cornelissen

Ok, thank you for the update.

JP

March 1, 2018 at 8:28 am #1532715

Cristina

Hi JP,

this is not resolved, but I think we can close the thread.

Kind regards,
Cristina

March 2, 2018 at 9:39 am #1534090

John-Pierre Cornelissen

n/a

May 28, 2019 at 9:57 am #3905073

agnesL

Same issue here...
Using Elementor and pulling content from other CPTs (related blog posts, image galleries etc), the word cound provided by WPML is twice more that the actuual specific content of the post.
And using ATE, it seems WPML tries to translate it indeed several times (for example legends of pictuires in the gallery) ...