Hi,
I want to develop an application that can work in 2 languages - English and French, I went through the documentation and other resources but it is not very clear how to go about it. Can someone kindly provide a step by step document or a resource if you have any (As in which files/plugins to download, where to store them, what changes are to be made in the appian objects and how to run the site finally). I understand some of the earlier plug ins used for this has been discontinued as well. It will be of great help.
Thanks in advance
Swetha
Discussion posts and replies are publicly visible
At the very minimum, you need the Load Resource Bundle plugin:
Additionally to facilitate the management of labels you can also install the Internationalization Application to manage labels in the DB rather than using files:
You can also check out this playbook article for more details: application internationalization for additional details.
Hi Mathieu Drouin
Thank you for your reply. I have downloaded the Load resource bundle plugin and the bundle management plugin. I shall install the plugins and how to work after that?. The internationalization application that you have mentioned needs a translation for every label which can be time and resource consuming since we are foreseeing a big HRMS application with all modules. So the internationalization application plugin will still need the resource bundle is it?. Can you please make the steps more clear. Hope you understand.
Thank you
The Load Resource Bundle plugin works with resource files in a key=value format. You must maintain a file for each language you want to support. No way around this.
The Internationalization Application is an application that requires the Load Resource Bundle plugin to work. It basically allows you to create keys and manage labels from an application rather than having to deal with the resource files themselves.
There is also this application to automatically translate applications that you can try: https://community.appian.com/b/appmarket/posts/application-translator.
Hi Mathieu Drouin,
Thank you for guiding and I also found out that that is the only way. In case I want to store the dynamic text( egs: user's comments) in 2 languages in my DB, how can I do it?. Google translation services is one way I think. Is there any other free way with inbuilt objects or plugins that I can use?. Please let me know if you have an idea on this? Thank you
Thank you for the link, you made my day.
For user text, I would only store the original text in the DB and translate it dynamically at runtime (in the interface) using a translation API.
Chrome offers to translate pages as well which is an even simpler option.
Will definitely check that possibility. Thank You Mathieu Drouin
If it helps in your specific situation, you can simply try designing the interfaces in the following way without installing anything extra, even though it may not be the fastest approach.
a!localVariables( local!language: "German", { a!columnsLayout( columns: { a!columnLayout( contents: {}, width: "WIDE" ), a!columnLayout( contents: {}, width: "NARROW" ), a!columnLayout( contents: { a!richTextDisplayField( label: "Rich Text", labelPosition: "COLLAPSED", value: { a!richTextItem( text: a!richTextItem( text: if(or(isnull(ri!language), ri!language=local!language), "Sprache", "Language" ), color: "SECONDARY" ), size: "SMALL" ) }, align: "RIGHT" ) }, width: "NARROW" ), a!columnLayout( contents: { a!dropdownField( label: if(or(isnull(ri!language), ri!language=local!language), "Sprache", "Language" ), labelPosition: "COLLAPSED", placeholder: if(or(isnull(ri!language), ri!language=local!language), "--- Wählen Sie eine Sprache ---", "--- Select a Language ---" ), choiceLabels: if(or(isnull(ri!language), ri!language=local!language), { "Deutsch", "Englisch" }, { "German", "English" } ), choiceValues: { "German", "English" }, value: if(or(isnull(ri!language), ri!language=local!language), local!language, ri!language ), saveInto: ri!language, validations: {} ) }, width: "NARROW" ) }, alignvertical: "MIDDLE" ), a!columnsLayout( columns: { /* Form content */ a!columnLayout( contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!sectionLayout( label: if(or(isnull(ri!language), ri!language=local!language), "Mitarbeiteradresse aktualisieren", "Update Employee Address" ), labelSize: "LARGE", labelColor: "STANDARD", contents: { a!dropdownField( label: if(or(isnull(ri!language), ri!language=local!language), "Land", "Country" ), placeholder: if(or(isnull(ri!language), ri!language=local!language), "--- Wählen Sie ein Land ---", "--- Select a Country ---" ), choiceLabels: if(or(isnull(ri!language), ri!language=local!language), { "Vereinigte Staaten von Amerika", "Deutschland" }, { "United States of America", "Germany" } ), choiceValues: { "United States of America", "Germany" }, value: ri!country, saveInto: ri!country, searchDisplay: "AUTO", required: true, requiredMessage: if(or(isnull(ri!language), ri!language=local!language), "Das Feld ist obligatorisch", "This field is mandatory" ), validations: {}, validationGroup: "isRequired" ), a!textField( label: if(or(isnull(ri!language), ri!language=local!language), "Adresse", "Address" ), placeholder: if(or(isnull(ri!language), ri!language=local!language), "--- Schreiben Sie eine Adresse ---", "--- Enter an Address ---" ), value: ri!address, saveInto: ri!address, refreshAfter: "KEYPRESS", required: true, requiredMessage: if(or(isnull(ri!language), ri!language=local!language), "Das Feld ist obligatorisch", "This field is mandatory" ), validations: {}, validationGroup: "isRequired" ) } ), a!buttonLayout( primaryButtons: { a!buttonWidgetSubmit( label: if(or(isnull(ri!language), ri!language=local!language), "Senden", "Submit" ), saveInto: {}, showwhen: true, style: "PRIMARY", validationGroup: "isRequired" ) }, secondaryButtons: a!buttonWidgetSubmit( label: if(or(isnull(ri!language), ri!language=local!language), "Stornieren", "Cancel" ), value: true, saveInto: ri!cancel, showwhen: true, style: "NORMAL", skipValidation: false ) ) } ) } ) } ) } ) } )
Thank you muhammedk, I had worked on similar lines