Multi Lingual app

Hi all,

I want to create multi-lingual app in 3 languages. Can i create it with Appgyver?

I want user to select the language only once at the time of registration. After that he can edit it from user properties.

1 Like

Translation variables are currently available only on AppGyver Black, but you could code this yourself so that you have an app variable object with structure like

translations: {
  hello_world: {
    en: "Hello world!",
    de: "Hallo Welt!"
  }
}

You could do this by defining your app variable schema then selecting “Initialize with value” from the cog advanced options menu.

And then you would have an appVars.currentLanguage that resolves to e.g. en or de based on user choice, and everywhere you use a string text you would have formula such as

LOOKUP(translations.hello_world, appVars.currentLanguage)

which would then resolve to e.g. “Hello World!” or “Hallo Welt!” depending on appVars.currentLanguage.

1 Like

@Harri_Sarsa: Hi ! I have started creating app. And also trying to configure the App level variable using variable type Object. But After adding property as String, There is no option to initialize Value of the value?

Am I doing it correctly? Is there any other option to do it?

To set the default value, you need to select the root key of the object, i.e. translations in this case. Then, the cog menu on the top right (just above your red square there) will let you select “initiialize with a value”.

1 Like

Hey guys! I am trying to do the same and see now, that there is no variable type “string” anymore… How can I realize a multilanguage app in this situation?

We have started to use Text instead of String to make the naming more familiar to users without background in programming

Hi,

I can share with you also the hack I figure out to support multiple languages. With a big emphasis on the hack…

  1. I have created an appVars.lang which is an object containing all phrases used in the app. It contains only the current language of the app. Here is an example for the German language :

    {
    “Good morning”:“Guten Morgen”,
    “My hovercraft is full of eels”:“Mein Luftkissenfahrzeug ist voller Aale”,
    “Very funny”:“Was soll das sein?”
    }

  2. In any place where there is a text visible, I would just type appVars.lang[“Good morning”].

  3. Based on the language selected I download the correct language version of this variable and save it (send to storage Flow Function) in the local storage. On app open it is being loaded up to the app variable.

  4. How translation is handled and created?
    For every phrase used in the app - there is a row in … Airtable. Each language has a specific column.

  1. I get the data to the app via using Integromat webhook, which based on request containing language parameter e.g. language=de sends the right object back.

This does work but the Integromat as an endpoint is definitely not production-ready. Incoming requests are processed one at a time. 10 users changing language at the same time would be about 10 sec wait for the last person.

I hope the Appgyver Team will be merciful for hor hacking around the Enterprise features :pray: :pray:

2 Likes

Hi @Greg_F,
a great way and very good descripted! But I plan a text intensive app and your way is not applicable to me… But thank you anyway!

I’m new to appgyver and one of the first things I checked was if there is built in support for i18n.

So there is no out of the box support for multi languages?

In the documentation there is this reference to i18n https://docs.appgyver.com/reference/flow_functions/i18n/set-current-language

What can you do with this?

@august_vorsterman

Inside the app you can see the i18n values in the systemVars and you can display or trigger current i18n values like preferred language.

I don’t know what does the flow function does, though.

Saw this at Release #116 (2019-09-30)

And this is from the home page

Hi! As explained by Harri above, multi-language support (translations) is an AppGyver Black feature. However, hacking around it and implementing it with page variables or whatever you choose is completely possible.

1 Like

Ah sorry my bad, I will try the workaround.

1 Like