Multi Language Application

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
JeanG
Posts: 3
Joined: Thu Dec 14, 2017 10:36 am

Multi Language Application

Post by JeanG »

I have the following question and maybe someone can help me here:

I am creating an application which must be multilingual. The UI languages might be different from the languages used in the BO.

The User Interface will be in 3 languages (English, German, French) and some more might be added later. This can be done using the 'locale'. The BO requires to be translated into different languages (choices of the customer using the application and each customer might have a different selection of languages), which might include many more languages than the ones defined in the 'locale'.

Example: User interface in EN, DE, FR and definition of currency - Code of currency plus dynamic nr of translations (EN,DE,SP,CZ, etc.) of the currency like below:

CODE - EN, DE, SP, CZ
----------------------------
CHF - Swiss Franc, Schweizer Franken, franco suizo, Svycarsky franc
AUD - Australian Dollar, Australischer Dollar, dolar australiano, Australsky dolar
XXX - CurrTransEN, CurrTransGE, CurrTransSP, CurrTransCZ
etc. etc.

These translations are used in the UI to display the BO in the language the user has defined in the 'SystemUser'. In the reporting or the export, the language of translation depends not on the 'locale' attribute in the 'SystemUser' but rather on a attribute of a BO.

I could create a BO with many attributes (Language1, Language2, Language3, Language4, Language5, Language6, Language7, Language8, etc.). This seems not very elegant to me, as some customer might only need two translations and others more than 10.

In a DB model approach a table for the currency definition (in the example above the 'Code') and an other table with the translation (Language, Description) would be created.

Is there a way in AwareIM to have a similar or better approach?

Thanks
Jean
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Multi Language Application

Post by aware_support »

I am not sure I understand what you are trying to achieve, but it sounds like you could create a separate business object for Currency and/or Language and use standard Aware IM reference attributes to manage this.
Aware IM Support Team
Powerm
Posts: 473
Joined: Mon Feb 01, 2010 9:44 pm
Contact:

Re: Multi Language Application

Post by Powerm »

Keep it simple : all BO's , Attribute and dropdown names in English and use the locales for your French, German or other translation.
Independent Developer
www.atwing.com
JeanG
Posts: 3
Joined: Thu Dec 14, 2017 10:36 am

Re: Multi Language Application

Post by JeanG »

The application is mainly for the Swiss market and here we have 3 languages spoken plus English. The customer base of our clients is from many different nations which all wish to have their reporting etc. in their language (Spanish, Portuguese, Italian, Czech, etc.).

At the moment I have two BO - one for the currency and one for the translation of the currency.

Example BO Currency:
CHF
YEN
etc.

Example BO Currency_translation
CHF (reference to Currency BO) - English - Swiss Franc
CHF (reference to Currency BO) - German - Schweizer Franken
YEN (reference to Currency BO) - English - Japanese YES
YEN (reference to Currency BO) - German - Japanischer YEN
etc.

When a logged in user has locale English all drop down boxes, grids etc should display the BO Currency_translation in English. If the logged in user has a locale in German all drop down boxes, grids etc. should display these in German.

How can I archieve this or what is the best way to implement this in Aware IM?

I would be thankful for any suggestions.
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Multi Language Application

Post by aware_support »

You do not need a special object for "currency translation". Just add an attribute to the Currency object called "Description", for example and another one to hold translated Description. Then you need to define translations of the different descriptions in the different locale. Finally you need a rule that uses the TRANSLATE function, that translates the given text to the locale of the current user:

Currency.DescriptionTranslated = TRANSLATE (Currency.Description)

See the documentation of the TRANSLATE function for more details.
Aware IM Support Team
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Multi Language Application

Post by PointsWell »

I started playing about with locales (in an effort to avoid real work) and have stumbled across a few issues:

I have created two locales for a practice app and set the default language of system messages and a culture.

When I then put this into test and inspect the code it launches an error
Failed to load resource: the server responded with a status of 404 (Not Found) http://.../AwareIM/KendoUI/js/messages/kendo.messages.fr-FR.min.js.map and
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) http://.../AwareIM/KendoUI/js/cultures/kendo.culture.fr-FR.min.js.map

When I check the server there are indeed no .map files

I've also been trying to find the documentation for the TRANSLATE function and I can't find any reference to it. I can insert it into a rule but it doesn't show up on the pop up code completion box, but when I save the rule it is quite happy.
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Multi Language Application

Post by aware_support »

You can ignore the console messages. We will investigate why the TRANSLATE function is not available (it should work, though)
Aware IM Support Team
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Multi Language Application

Post by aware_support »

The TRANSLATE function is part of the list, so not sure why you couldn't find it
Aware IM Support Team
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Multi Language Application

Post by PointsWell »

aware_support wrote:The TRANSLATE function is part of the list, so not sure why you couldn't find it
See screenshot - Build 2375 (Mac Configurator, LINUX AIM Server)
Function Helper Not Showing TRANSLATE
Function Helper Not Showing TRANSLATE
Screen Shot 2018-02-01 at 12.41.06.png (14.47 KiB) Viewed 21296 times
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Multi Language Application

Post by aware_support »

You are displaying the wrong list. The list of functions is displayed separately (F4 on Windows as opposed to F3, something else on Mac - see the text above the controls)
Aware IM Support Team
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Multi Language Application

Post by PointsWell »

aware_support wrote:You are displaying the wrong list. The list of functions is displayed separately (F4 on Windows as opposed to F3, something else on Mac - see the text above the controls)
Oops
JeanG
Posts: 3
Joined: Thu Dec 14, 2017 10:36 am

Re: Multi Language Application

Post by JeanG »

The example above I described had only a translation in English and German. The user might want to add more translations (Spanish, French, Swedish, etc.). The number of translations needs to be dynamic as every customer has different needs/translation needs. All the translations are done by the end user as some might want to have 'Swiss franc' other customers 'SWISS FRANC' etc. as a translated value.

I am not sure using the suggestion would solve the problem, but I might be mistaken, as I am fairly new to AwareIM.

Any other ideas how to solve it?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Multi Language Application

Post by aware_support »

It doesn't matter if a translation is added dynamically - the TRANSLATE function will always translate to the current locale. But you do have to define all possible locale in your configuration.
Aware IM Support Team
Post Reply