Skip to main content
swethai0002
May 16, 2023
Solved

Internationalization

  • May 16, 2023
  • 9 replies
  • 0 views

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

Best answer by mathieud0001

At the very minimum, you need the Load Resource Bundle plugin: [View:https://community.appian.com/b/appmarket/posts/load-resource-bundle:0:50] which will help you manage labels via resource files.

Additionally to facilitate the management of labels you can also install the Internationalization Application to manage labels in the DB rather than using files: [View:https://community.appian.com/b/appmarket/posts/internationalization-application:0:50]

You can also check out this playbook article for more details: [View:https://community.appian.com/w/the-appian-playbook/100/application-internationalization:0:50] for additional details.

9 replies

mathieud0001
May 16, 2023

At the very minimum, you need the Load Resource Bundle plugin: [View:https://community.appian.com/b/appmarket/posts/load-resource-bundle:0:50] which will help you manage labels via resource files.

Additionally to facilitate the management of labels you can also install the Internationalization Application to manage labels in the DB rather than using files: [View:https://community.appian.com/b/appmarket/posts/internationalization-application:0:50]

You can also check out this playbook article for more details: [View:https://community.appian.com/w/the-appian-playbook/100/application-internationalization:0:50] for additional details.

swethai0002
May 16, 2023

Hi [mention:f5e81b8502fa4e77ad12697686a4fc56:e9ed411860ed4f2ba0265705b8793d05]

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

Swetha

mathieud0001
May 16, 2023

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.

September 6, 2023

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
                        )
                    )

                  }
                )
              }
            )
          }
        )

      }
    )
  }
)

swethai0002
September 11, 2023

Thank you [mention:72185cd1b9394b6c99a6f666aec1e66b:e9ed411860ed4f2ba0265705b8793d05], I had worked on similar lines