- Issue created by @WalterP
- 🇩🇪Germany SteffenR Germany
Setting
translate="no"
while handling HTML or XML is the only way to prevent the translation of the content in a tag.
What is your setting for tag handling? This should be set to HTML or XML.Have you tried other languages with
translate="no"
.The problem is not related to the module itself, since we only pass all markup to the DeepL API translate endpoint and use the returning values as the translation.
- 🇩🇪Germany WalterP
Thank you.
Yes, it is set to HTML.
Then I go to DeepL and contact the support.
- 🇩🇪Germany WalterP
The support from DeepL shows, that
<p translate="no">§§§</p> OLED <p translate="no">§§§</p>
is not sent to DeepL in the query params.I tried to change the text to be translated with several tmgmt hooks:
- - hook_tmgmt_job_before_request_translation
- - hook_tmgmt_job_after_request_translation
- - hook_tmgmt_data_item_text_output_alter
- - hook_tmgmt_data_item_text_input_alter
but none of them changes the query string sent to DeepL.
Is there any tmgmt or tmgmt_deepl hook, that I can use?
- 🇩🇪Germany SteffenR Germany
You can use the
hook_tmgmt_deepl_query_string_alter
to alter the query string.
Other hooks and examples can be found in the file tmgmt_deepl.api.php. - 🇩🇪Germany WalterP
OK, thank you. I'll try this.
Just another question: We translate our site into 36 languages and use DeepL for the languages that are supported from DeepL and Microsoft Azure for the rest. Is there any possibility to request a translation for all languages in the tmgmt cart and then, when submitting to provider, the jobs are automatically sent to the right translation provider?