Problem when translating UI into other languages

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
Johann
Posts: 240
Joined: Wed Jun 17, 2015 12:46 pm

Problem when translating UI into other languages

Post 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
cosminef
Site Admin
Posts: 234
Joined: Wed Aug 30, 2023 2:33 pm

Re: Problem when translating UI into other languages

Post 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
Cosmin Eftenie
www.oxygenxml.com
Johann
Posts: 240
Joined: Wed Jun 17, 2015 12:46 pm

Re: Problem when translating UI into other languages

Post 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
cosminef
Site Admin
Posts: 234
Joined: Wed Aug 30, 2023 2:33 pm

Re: Problem when translating UI into other languages

Post 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
Cosmin Eftenie
www.oxygenxml.com
Post Reply