Page 1 of 1

Problem when translating UI into other languages

Posted: Tue Jul 09, 2024 6:49 pm
by Johann
Hello,

We're using Author Web version 26.1.0.1.

We would like to translate the user interfaces into other languages (IT / ES) than those provided by default.
We've added the following to the translation.xml file:

Code: Select all

<languageList>
<language description="English" lang="en_US"/>
<language description="German" lang="de_DE"/>
<language description="Italian" lang="it_IT"/>
<language description="Spanish" lang="es_ES"/>
<language description="French" lang="fr_FR"/>
<language description="Japanese" lang="ja_JP"/>
<language description="Dutch" lang="nl_NL"/>
</languageList>
This file is transformed into 0translation.js using gulpfile. Example:

Code: Select all

(function(){var msgs={YES_:{de_DE : "Ja",it_IT : "Sì",es_ES : "Sí",fr_FR : "Oui",en_US : "Yes"}};sync.Translation.addTranslations(msgs);})();
When we modify the lang parameter in the URL, for example by adding "lang=it", we get a warning in the development tools console:

Code: Select all

invalid language format it_IT
and translations are not taken into account.

Furthermore, we have seen in the console:

Code: Select all

sync.Translation.supportedLanguages = window.supportedLanguages ;
are equal to:

Code: Select all

{code: 'en_US', description: 'English'}
{code: 'de_DE', description: 'Deutsch'}
{code: 'fr_FR', description: 'Français'}
{code: 'ja_JP', description: '日本語'}
{code: 'nl_NL', description: 'Nederlands'}
{code: 'zh_CN', description: '中文'}
What did we miss?

Thanks your help,

Johann

Re: Problem when translating UI into other languages

Posted: Wed Jul 10, 2024 5:33 pm
by cosminef
Hello,

Thank you for contacting us.

Currently, we do not support adding new languages.
We already have a feature request registered (WA-1264) in this regard.
We've added your vote to it and are checking if we can find a workaround for you.

Best,
Cosmin

Re: Problem when translating UI into other languages

Posted: Wed Jul 10, 2024 7:46 pm
by Johann
Hello,

Thank you for your response.

Just to make sure I understand.
My initial request concerned the addition of new translation keys and a new language for these keys.
Can you confirm that even the translation of the "basic" interface labels into a new language is not possible, is that correct?

Is there no mechanism similar to the one described here https://www.oxygenxml.com/doc/versions/ ... guage.html for translating labels in Web Author into another language?

Regards,

Johann

Re: Problem when translating UI into other languages

Posted: Thu Jul 11, 2024 6:37 pm
by cosminef
Hello,
Can you confirm that even the translation of the "basic" interface labels into a new language is not possible, is that correct?
Yes, that is correct

One hacky way would be to overwrite one of the current supported languages, let's say to replace all Chinese messages with Italian, then it would work.
If going through the URL parameter route, you would have to set zh or zh_CN to select italian.
Your plugin would have to provide a large translation.xml to cover server-side translations and there would be a 0translation.js to cover client-side translations.

Best,
Cosmin