How to create a multi-lingual app in PowerApps.

To create a multi-lingual app in PowerApp there are a number of things that you need to consider. First of all which languages are your users using and which languages are you going to support. To identify which language your user is using there is the useful function Language() available

The Language() Function

The language function gives you a code like en-GB for British English. The Language function is described on the language function site. The documentation even gives an example of an Excel file containing all the languages. In my case I wanted to create a language variable that holds all the details of all my languages.

Language Packs / Resource files

Many of the systems that we are used to use things like resource files or language packs. These hold data for each language used by your app. In my case I’m going to set a variable called LanguagePacks

Set(LanguagePacks, [
{
LanguageCode: "en-GB",
Translations: {
resVersion: "Version",
resDetails: "Data"
}
},
{
LanguageCode: "du-NL",
Translations: {
resVersion: "Versie",
resDetails: "Gegevens"
}
}
])

Within my app I want to be able to switch between the languages as shown below. Especially during development the drop down is easier than using the Language function.

 

Now all I need is a Gallery and a label holding my current language with the language codes. In my case I called this MyTranslations_1

Within the gallery I created a control ( in my case labels) that hold the current value relevant for my language. So for example the resDetails holds the text for Data (Gegevens in Dutch).

Now when I want to use the details in my actual app, things become very easy!

All I need to refer to is the control names that contain the right values for each language.

 

 

Advertisements

Please leave a comment or feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.