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

My Gallery for Language

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!

Resource Details

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

 

 


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. You can contact me using contact@sharepains.com

Related Posts

Leave a Reply

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

Discover more from SharePains

Subscribe now to keep reading and get access to the full archive.

Continue reading