[Resolved] AI translation how to select what to translate
This thread is resolved. Here is a description of the problem and solution.
Problem: The client noticed a discrepancy between the estimated word count provided by WPML for a product translation and the actual word count they calculated manually. They also observed that the translation credits charged were higher than expected based on the estimated word count. Solution: 1. We verified the word count for a completed translation job and confirmed that the count matched the credits charged. 2. We examined the XLIFF file for the job in question and found that the word count included meta data from SEO, post excerpts, and texts from media on the page, which explained the higher word count. 3. We clarified that all texts within a single translation job are counted, including duplicates, but if the same texts are included in later jobs and have already been translated, they are not charged again. 4. We explained that the estimated word count shown before translation is a rough estimate based on character count and typical word length, which may not always match the actual word count. 5. We suggested that if DeepL translation costs are higher than desired, the client could consider using Microsoft for translation, which is half the price. For more details on translation costs, you can check the WPML Automatic Translation Pricing page.
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.
i use AI translation and it works quite good, but I have problem cause AI seems to translate same things over and over.
Example I have woocommerce product and every product has advice "Good to know" next to it. Advices are taken form pool of 45 advices which is custom post type.
I translated all advices and work ok, but when I do translation of product it translate advices again for every product. Because of this I spend a lot more credist than I should.
Also there are few other words AI seems to translate over and over again.
Is there option to select AI what to translate on specific post type.
Tranaslated page for example you can see on: hidden link
I assume when you say "AI translation" you mean "automatic translation" (via Deepl, Google, or Microsoft).
I can see on the link you shared the "Good to know" box, which appears to be inserted via a shortcode in your Elementor template for WooCommerce Products.
These are from an "Advice" post type, correct?
And you have translated these Advice posts to other languages, yes?
I would not expect to see the texts from these Advice posts in the translation editor when editing a product (or to be included in the texts that are sent for automatic translation).
Could you share with me your Automatic Translation account id, which you can find at WPML > Support, following the troubleshooting link. I want to check the history of the translations on your site on our servers to check what has been included for translation when translating a product.
My point is for example product: hidden link
This isn't translated yet and estimate of words in translation managment is 269 words.
When i cut out content and put in Word i see there is only 207 words.
Also when I do translate it usualy take me 15% more credits than is 269x2= 538 credits
I want to know where this additional words are coming from.
My translation ID: 66663164-6537-5565-b761-313764316262#rD0YVQXlvQW9I6Fx8ttDuAtt
I can only check translations that have happened already, and there it appears to be working correctly.
Take the "Merilne naprave" post.
The job says the word count was 95 words. I extracted the text from the job and pasted it into a text editor to do a word count, and it was correct, 95 words.
And from the billing side, I see the translation was done using Deepl, and that you were charged 190 credits (95 * 2) for the translation.
So that appears correct.
To be able to check something that you intend to translate I would need access to your site, if that's possible. I can check the post you linked to above, if you haven't already translated it.
Let me mark your next reply as private so that I can get log-in credentials from you. I will only be checking the translation, but you should nevertheless have a current backup of your site.
So I translated product mention above: hidden link
It says it's 269 words, my count is 201 words. Also I had 65004 before translation and after 64380, difference is 624 credits. It should be 538 credits.
I don't know where does get count 269 words to start with.
OK, I can access the login page now, but it tells me that there is no user with the username you provided, and the email address you shared isn't recognised either...
Discussing that particular job, I can see from the internal report that it records 312 as the untranslated word count (and 312 * 2 results in the 624 credits charged).
I downloaded the XLIFF file for the translation job and carefully extracted all of the texts sent for translation (ignoring duplicates), and came to 267 words. That is more-or-less the same as the 269 word estimate you were given.
That's higher than simply copying and pasting the content from the editor into another document (the 201 words you counted), because the text that is sent for translation includes some meta data from rank math SEO, the post excerpt, and a handful of small texts coming from media on the page.
(You can go to WPML > Translations and download the XLIFF files of jobs yourself to check the exact text which is included.)
I'm raising this with my colleagues so they can look into it and I can hopefully get a concrete explanation for the difference between 267/269 and 312.
I'll get back to you in a while when I have heard from them.
Where can I download XLIFF file. I looked into WPML > Transalations and there is only one translation there of the elementor template page.
I found done translations in Translation Management -> Jobs (tab) but I can't download any XLIFF file. Only options are get / cancel translations. But if I choose Get translation I only get error "This actions doesn't ..."
So where exactly I can get this file, so I see what is getting translated.
Here, I zipped up the XLIFF file as well as a txt file of the text that I manually extracted from the XLIFF file for the source texts. In my editor it automatically calculates a word count of 267, which is more-or-less the same as the 269 word estimate you saw.
Note, when extracting the text, I discarded duplicates (e.g. the post title appears several times throughout the XLIFF file). Also, there are some texts which appear like slugs that I expect cannot be translated but nevertheless appears as a word in the word count (it's obvious to the human eye, but not to the automatic extraction process).
hidden link
(I'm still waiting for feedback about how the text of 269 words resulted in being charged for 312 words.)
Now I see where is difference between Word calculation and WPML calculation. There is some code as URL and similar.
But there are still errors, i marked them in attached image. It translated title 3 times and there are quite a few translation for "Airfan humidifer" that are not on page.
Does it maybe translate related product, that are on bottom of page?