How to Build Multilingual app in PowerApps

Introduction

When you are going to work with the Powerapps Multilingual, first of all, one thing that will come to your mind is what this Multilingual means.

Multilingual means many or several languages. Similarly, PowerApps Multilingual defines many languages that PowerApps localize. Like our systems (suppose Computer, Mobile) support some different types of languages, PowerApps also has some multi-languages.

For example, if we set any browser (Chrome) language to Spanish, then we will see the authoring Studio only in that language.

Use of multilingual in PowerApps

The most important thing is where you can use this Multilingual feature in the PowerApps app. Let’s take a simple scenario.

Suppose you have created a PowerApps app that will be used in Germany or Italy. In that case, you can use PowerApps Multilingual to display German or Italian to users in those different locations. Simply, those users can select a specific language and use the app.

How to build multilingual app in PowerApps

To use this Powerapps Multilingual, We can easily build a multilingual app in PowerApps. Using this app, we can provide multiple language options to the users (those who will use the app) so that the user can select their language and efficiently use the app.

To create a PowerApps Multilingual app, you need to follow the below steps:

  • First, Create an Excel spreadsheet containing the Language, Key, and Value columns.
  • After creating all these columns, Do not forget to add datasource to this Excel spreadsheet in powerapps.
  • In the PowerApps app, Use a Lookup to the Excel item based on the Key.

Step 1. Create an Excel Spreadsheet and Format as Table

Below, you can see the Excel spreadsheet (named Multilanguages) that I have created:

Create an Excel Spreadsheet

Always remember one thing: In the Powerapps Multilingue, the resource files expect only two things, i.e., one is Key, and the other one is Value.

NOTE:

  1. Not only can you use Microsoft Excel as a Resource file, but you can also use the SharePoint Online List, where you can store the Key and Value to build a Powerapps Multilingue app.
  2. You need to ensure that your records are present inside a Table in Excel. Otherwise, Powerapps will not allow the normal Excel file.

Step 2. Now Navigate to https://make.powerapps.com.

Step 3. Click New Apps Page Design, Go to Data sources -> Search for import from Excel -> Add a new connection as shown below.

Import from excel

Step 4. Now select the Excel from your Saved Location.

Step 5. Once you select Excel, you will see the Data Gets added Successfully in the PowerApps.

Data Gets added Successfully in the PowerApps

Step 6. Next, add these below Powerapps input controls as:

  • Insert five Labels [One is for Title, and the other four are for fields like Product Name, Vendor, Product Quantity, and Product Price].
  • Add four Text input controls for four Labels. Then, set all inputs Default property to blank.
  • Insert one Button. The total app will look like the below structure:
    Powerapps form
  • Add one Dropdown control and rename it to ddLanguage.
  • Select the Dropdown control and set its Items property as:
    ["Select Language","en","es","fr","hi","zh","de"]
    Dropdown control Items property

Step 7. Next, select the Dropdown control and apply the below formula on its OnChange property.

Set(setLang,Coalesce(LookUp(Table1,Dropdown1.SelectedText.Value=Language).Language,"en"))

OnChange property

Whereas

  • setLang = Created a Global Variable named as setLang
  • Coalesce = Coalesce is a Powerapps function that helps to convert an empty string to blank values
  • LookUp = LookUp function helps to find the first record in the Excel table that satisfies the formula
  • Table1 = It is the Table name of the Excel Spreadsheet
  • Dropdown1 = Dropdown control name
  • Language = It is the First column name of the Excel sheet

Step 8. Next, go to the other Label controls (like Product Title, Product Name, Product Vendor, etc.) and apply the below formulae on its Text property:

Product Details:LookUp(Table1,Key="ProdTitle" And Language=setLang,Value)
ProdName: LookUp(Table1,Key="ProdName" And Language=setLang,Value)
Product Vendor:LookUp(Table1,Key="ProdVendor" And Language=setLang,Value)
Product Quantity:LookUp(Table1,Key="ProdQuantity" And Language=setLang,Value)
Procuct Price: LookUp(Table1,Key="ProdPrice" And Language=setLang,Value)
Submit: LookUp(Table1,Key="BtnTitle" And Language=setLang,Value)

This formula will check your key and return the value from that specific Excel sheet.

Step 9. Now, Save and Preview (F5) the app. Select any language from the Dropdown control. Then, you can see that the other text fields are being changed in the selected language.

multilingual app in PowerApps


Similar Articles