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.
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:
- At first, Create an Excel spreadsheet that should contain the Language, Key, and Value columns.
- After creating all these columns, Do not forget to store this Excel spreadsheet in OneDrive or in SharePoint Online List.
- In the PowerApps app, Use a Lookup to the Excel item based on the key.
Now, We will see in details:
- Create an Excel Spreadsheet and Format as Table
- Create an Excel file that contains three columns as Language, Key, and Value. Where,
- Language: This column specifies different types of languages like English, Arabic, Spanish, French, Dutch, etc.
- 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.
- 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).
Below you can see the Excel spreadsheet (named as Multilanguages) that I have created:
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:
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.
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:
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"))
- 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
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)
- 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:
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.
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:
|“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:
- PowerApps Popup message Box with Examples
- Get users from SharePoint Group in PowerApps
- PowerApps camera control + Save captured image in SharePoint
- PowerApps role based security SharePoint example (SharePoint Groups)
- PowerApps: Submit data to two SharePoint Lists
- PowerApps Patch Function with examples
- Embed PowerApps in SharePoint modern page
- Show hide fields based on dropdown selection PowerApps
- How to use date time picker in PowerApps
- PowerApps Examples – COVID 19 Self Declaration form
- PowerApps Value Function – How to use
- PowerApps Barcode Scanner
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
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com