Hello,
Thank you for getting in touch with us!
You can specifically select any html block to be translated as a whole by adding the class ‘translation block’ to it. For example:
<div class=”translation-block”>
Translate everything <div>inside</div>
</div>
Let me know if this approach suits your needs.
Best regards,
Hi again,
Thanks for your reply.
I tried this and it worked for me, but whenever anything changes in the original language page, the translated page switches back to the original language and has to be translated again. That could be an issue for clients of developers who are not aware of this.
If there is any other way to translate complete pages at once, please inform me.
Hi,
There is no other way to translate complete pages at once.
This is due to the way our plugin works(string by string translation);so if you change anything in the default string , it will invalidate the whole translation(due to the fact that the string becomes a totally different one).
Using translation-block basically merges all the strings inside of it into one string.
With the best regards,
Isn’t it possible to put all languages in the post one after another using e.g. shortcodes like with Transposh?
Ok, I see the translation memory is working and showing the older translation of similar older versions of the page. It is still good if there will be the option to add all the languages in the same page.
Regards
Ok it seems there is a bug. One page remembers the previous translation of similar original page, another does not.
Hello,
>Isn’t it possible to put all languages in the post one after another using e.g. shortcodes like with Transposh?
Can you please explain further what you are trying to achieve?
Also,another approach for translating whole pages would be to use our Conditional Shortcode:https://translatepress.com/docs/translation-shortcode/.
It lets you display content based on the chosen language,also in this way you won’t have your translations invalidated if you change anything.
It should work better if you have only one language added.
Let me know how this goes.
Best regards,
Thanks Dragos,
Now I notices the error of using that shortcode. I was using en_US in the code while the second language of my site is en_GB, I changed it and it worked using the code below pasted in the page:
<div class=”translation-block”>
[trp_language language=”de_DE”]
<p>The Text in German</p>
[/trp_language]
[trp_language language=”en_GB”]
<p>The text in British English</p>
[/trp_language]
</div>
My final question: Does that not work for pages with three languages or more or will it have disadvantages like performance or Seo issues?
-
This reply was modified 6 years, 5 months ago by
atheerhuwa.
Hello,
It should work for pages with three or more languages as well.
Also, you don’t necessarily need to use the translation-block class in this case.
You can write something like:
[trp_language language=”de_DE”]
<p>The Text in German</p>
[/trp_language]
[trp_language language=”en_GB”]
<p>The text in British English</p>
[/trp_language]
The text in german will be shown when german is selected and the text in english will be shown when english is selected.
With the best regards,