How to build multilingual app in PowerApps

In this Microsoft PowerApps tutorial, let us discuss step by step how to build multilingual app in PowerApps. We will see what is PowerApps multilingual, What is the use of multilingual in Powerapps and also, we will check Powerapps Language Functions.

Powerapps Multilingual

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

Multilingual means many or several languages. Similarly, PowerApps Multilingual defines many languages that are localized by PowerApps. Like our systems (suppose Computer, Mobile) supports some different types of languages, Similarly, PowerApps also is having some multi-languages.

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

Use of multilingual in PowerApps

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

Suppose, you have created a PowerApps app and that app will be used in Germany or Italy. Then, in that case, you can use the Powerapps Multilingual to display the German or Italian to the 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. By using this app, we can provide multiple language options to the users (those who are going to use the app). So that the user can select its own language and easily use the app.

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

  1. At first, Create an Excel spreadsheet that should contain the Language, Key, and Value columns.
  2. After creating all these columns, Do not forget to store this Excel spreadsheet in OneDrive or in SharePoint Online List.
  3. In the PowerApps app, Use a Lookup to the Excel item based on the key.

Now, We will see in details:

  1. Create an Excel Spreadsheet and Format as Table
  • Create an Excel file that contains three columns as Language, Key, and Value. Where,
  1. Language: This column specifies different types of languages like English, Arabic, Spanish, French, Dutch, etc.
  2. Key: This is like a Key and Value pair that is common for one value. Here you will store all the keys like ProdTitle, ProdName, ProdVendor, etc.
  3. Value: In this column, you can store your control value like Product Title, Product Name, Product Vendor, etc.
  • Add some records in the Excel file. Select all the file contents and then format it as Table (Select records -> Go to Home tab -> Format as Table -> Select one table).
  • Enter the Excel file Table Name (Select the Excel Table -> Go to Design tab -> Enter the name [PowerappsLanguages] under Table Name field).
Build a multilingual app in Powerapps
build multilingual app in PowerApps

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

Multilingual in PowerApps
build multilingual app in PowerApps

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

NOTE:

There are two important things that you need to remember:
1. Not only you can use Microsoft Excel as a Resource file, But also you can use the SharePoint Online List where you can store the Key and Value to build a Powerapps Multilingue app.
2. You need to make sure that your records should be present inside a Table in Excel. Otherwise, Powerapps will not allow the normal Excel file.

2. Store the Excel spreadsheet in OneDrive

Next, you need to upload this Excel spreadsheet (Multilanguages) in your OneDrive as shown below:

Powerapps Multilingual

3. Create Powerapps Multilingual app and Use Lookup to Excel item

Now, We will create a Powerapps Multilingual app on the Powerapps screen and use the Lookup function for Excel items. For that, follow these below thigs as:

  • Sign in the PowerApps app with your credentials.
  • Create a blank new Canvas app and choose any one Layout either Tablet or Phone.
  • On the Powerapps Blank screen, Connect the OneDrive Data source that you have uploaded the Excel sheet in your OneDrive.
  • Go to View tab -> Data sources -> Search OneDrive for Business -> Add a new or an existing connection as shown below.
Build multilingual app in Powerapps
How to build multilingual app in PowerApps

Next, add these below Powerapps input controls as:

  • Insert five Labels [One is for Title and other fours are for different fields like Product Name, Product Vendor, Product Quantity and Product Price].
  • Add four Text input control for four Labels. Then, set all inputs Default property to blank.
  • Insert one Button. The total app will look like below structure:
create a multilingual app in Powerapps
How to build multilingual app in PowerApps

Do not Hardcode anything in all four Labels Text property (Product Name, Product Vendor, etc). Also, do not hardcode anything in the Title field’s Text property (Product Details). Set all the Text property as Blank. The above screenshot is for your reference purposes.

  • Add one Dropdown control and rename it to ddLanguage.
  • Select the Dropdown control and set its Items property as:
Items = ["Select Language","en","es","fr","de"]

These are the User’s prefer Language.

  • Next, select the Dropdown control and apply this below formula on its OnChange property as:
OnChange = Set(setLang,Coalesce(LookUp(PowerappsLanguages,Dropdown1.Selected.Value = Language).Language, "en"))

Where,

  • 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
  • PowerappsLanguages = It is the Table name of the Excel Spreadsheet
  • Dropdown1 = Dropdown control name
  • Language = It is the First column name of the Excel sheet
multilingual app in powerapps
Steps to build multilingual app in PowerApps

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

Product Details (Text) = LookUp(PowerappsLanguages,Key="ProdTitle" And Language=setLang,Value)
Product Name (Text) = LookUp(PowerappsLanguages,Key="ProdName" And Language=setLang,Value)
Product Vendor (Text) = LookUp(PowerappsLanguages,Key="ProdVendor" And Language=setLang,Value)
Product Quantity (Text) = LookUp(PowerappsLanguages,Key="ProdQuantity" And Language=setLang,Value)
Product Price (Text) = LookUp(PowerappsLanguages,Key="ProdPrice" And Language=setLang,Value)
Submit (Text) = LookUp(PowerappsLanguages,Key="BtnTitle" And Language=setLang,Value)

Where,

  • PowerappsLanguages = Excel sheet Table name
  • Key, Language and Value = These are the columns that are present in the Excel sheet
  • setLang = Global variable name that has been created in Dropdown’s OnChange property

This formula will check your Key and it will return you the value from that specific Excel sheet.

Refer this below screenshot:

building multilingual apps in powerapps
multilingual in powerapps

As like the Title (Product Details), You will set the Text property of all rest Label controls (Product Name, Product Vendor, Product Quantity etc.).

Now, Save and Preview (F5) the app. Select any language from the Dropdown control. Then at the same time, you can see the other text fields are getting changed as per the selected language.

Powerapps Multilingual app
multilingual app in powerapps

As in the above screenshot, I have selected the Language as “fr“, So all the field controls are appearing with the French language.

Powerapps Language Function

Powerapps Language function helps to return the language, script tag of the current user. This function provides the languages to the user across locales. By using this function, Users can choose any language and use the app in the Powerapps.

The syntax of Powerapps Language Function is “Language()“. There are three formats present in the Language tag as:

Return ValueDescription
“lg‑RE”lg is the two character abbreviation for the language and RE is the two character abbreviation for the region. This is the most common return type. For example, “en-GB” is returned for Great Britain.
“lg”lg is the two-character abbreviation for the language. This is the format used when Power Apps has information about the language but does not have information for the specific region.
“lg‑scrp‑RE”lg is the two-character abbreviation for the language, scrp is the four-character abbreviation for the script, and RE is the two-character abbreviation for the region.

PowerApps uses the IETF BCP-47 language tag format.

For more details of Powerapps Language, you can follow this below MSDN article:

Also, you may like these below PowerApps Tutorials:

In this Powerapps Tutorial, We discussed what is a multilingual app in Powerapps, What is the use of multilingual in Powerapps. Also by taking a simple scenario, We saw these below things as:

  • Building multilingual apps in Powerapps
  • What is Powerapps Language Function
>