4 Various Ways to Build Multilingual Apps in Power Apps

While working with Power Apps, we can usually build or operate the applications using the English language. But you can also use a multilingual app that provides a great experience for users to work with different languages.

In this Power Apps article, I will explain Power Apps Coalesce, how to build a Power Apps multi language app in Power Apps Canvas app.

Apart from that, we will discuss about PowerApps language function and 4 different ways to make PowerApps multi language applications. Such as:

  1. PowerApps coalesce
  2. Power Apps coding language
  3. PowerApps language translation using Excel sheet
  4. Power Apps Language function

Power Apps Multilanguage

When you work with Power Apps Multilingual, the first thing that comes to mind is what this Multilingual means.

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

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

1. Power Apps Coalesce

To build a Power Apps coalesce, refer to the example below.

In Power Apps, there is one Text input and a Label control. When a user enters any text in the text box (in English), that text will convert to Danish, and the result will appear in the label, as shown below.

power apps language translation

To work around this, follow the below steps:

  1. In your Power Apps app, connect the MicrosoftTranslator connector, as shown below.
coalesce in powerapps app

2. On the Power Apps Screen, insert a Text input control and set its Default property to blank.

coalesce in powerapps

3. Next, insert a Text label and set its Text property to the code below:

Text = MicrosoftTranslator.Translate(
    txt_Record.Text,
    "da"                                                                       //You can add different language codes
)

Where,

  • txt_Record = Power Apps text input control name
powerapps change language

4. Once your app is ready, Save, Publish, and Preview the app. Whenever the user adds any language text to the text input, the text label translates that text into the Danish language, as shown below.

power apps change language

2. Power Apps Coding Language

In Power Apps, there is a Text label having some text, and a Dropdown control contains different language codes. Whenever the user selects any language code from the dropdown, the label text will be changed to the selected dropdown language.

See also  How to Count Rows in Power Apps Collection?

Have a look at the below screenshot for the output:

power apps language code

To achieve this example, follow the below steps. Such as:

1. Select the App object [From left navigation] in the app and set its OnStart property to the code below.

OnStart = ClearCollect(
    colMultilanguages,
    {
        Language: "English",
        Code: "en"
    },
    {
        Language: "French",
        Code: "fr"
    },
    {
        Language: "Spanish",
        Code: "es"
    },
    {
        Language: "German",
        Code: "de"
    },
    {
        Language: "Chinese",
        Code: "zh"
    },
    {
        Language: "Rusian",
        Code: "ru"
    }
)

Where,

  • colMultilanguages = Power Apps collection name
powerapps coding language

2. On the Power Apps Screen -> Insert a Dropdown control and set its Items property as:

Items = colMultilanguages
power apps code language

3. Now, select Text label control and set its Text property to the code below.

Text = MicrosoftTranslator.Translate("Explore the full potential of Microsoft Power Platform products through various online training courses, documentation, and videos.
These resources provide in-depth coverage of product capabilities and practical how-to guides.
By leveraging these resources, you can learn how to build custom applications efficiently with Power Apps, automate workflows to enhance business productivity with Power Automate, analyze data for insights using Power BI, and seamlessly design, configure, and publish modern websites with Power Pages",drp_Languages.Selected.Code)

Where,

  • drp_Languages = Power Apps dropdown control name
microsoft power apps language

4. Save, Publish, and Preview the app. When the user selects any language code from the dropdown, the label text will be changed to the selected dropdown language, as shown below.

language used in power apps

3. PowerApps Language Translation Using Excel Sheet

In Power Apps, there is a dropdown control containing some language codes from Excel and some text fields. If the user selects a language from the dropdown control, the text fields change based on that language.

Output:

powerapps change multilanguage

To work around this example, follow the below steps.

  1. First, Create an Excel spreadsheet that should contain the LanguageKey, and Value columns.
  2. After creating these columns, store this Excel spreadsheet in OneDrive or a SharePoint Online List.
  3. Use a Lookup to the Excel item based on the key in the Power Apps app.

Create an Excel Spreadsheet and Format as Table

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

Below, you can see the Excel spreadsheet [Multilanguages] that I have created:

powerapps coalesce

Always remember one thing: In the PowerApps Multilingue, the resource files expect only two things: a Key and a Value.

NOTE:

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 Power Apps Multilingue app.
2. You need to make sure that your records should be present inside a Table in Excel. Otherwise, Power Apps will not allow the normal Excel file.

Store the Excel Spreadsheet in OneDrive

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

powerapps multilanguage

Create Power Apps Multilingual app and Use Lookup to Excel item

Now, We will create a Power Apps Multilingual app on the Power Apps screen and use the Lookup function for Excel items. For that, follow the below steps:

See also  Power Apps Update Data Table [With Examples]

1. Open the Power Apps app -> Connect the respective Excel sheet [Data-> OneDrive for Business -> Excel Sheet].

powerapps language

2. Insert five Labels [One is for Title, and the other four are for different fields like Product Name, Product Vendor, Product Quantity, and Product Price].

3. 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:

multilingual powerapps

4. Now, add a Dropdown control and set its Items property to the code below.

Items = ["Select Language","en","es","fr","de"]

5. Next, select the Dropdown control and apply the 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 Power Apps 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
  • Language = It is the First column name of the Excel sheet
power apps content language

6. Next, go to the other Label controls 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
See also  8 Various Ways to Use The Patch Function in Power Apps

7. Also, you can use the formula below to check your Key and its value from a specific Excel sheet.

Text = LookUP(PowerappsLanguages, Key="ProdTitle" And Language=setLang,Value)
powerapps language translation

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

9. Once your app is ready, Save, Publish, and Preview 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.

Have a look at the below screenshot for the output:

power app language

4. Power Apps Language Function

The Power Apps Language function returns the language and script tag of the current user. This function provides the user with languages across locales. Users can choose any language and use the app in PowerApps.

The syntax of Power Apps Language Function is “Language().” There are three formats present in the Language tag, such 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

Example: In the Power Apps Welcome Screen has a Text label, and I want to display a greeting message [Welcome to Power Apps] in the text label based on the user’s browser language.

To do so, follow the below steps.

1. On the Power Apps Screen -> Insert a Text label and set its Text property to the code below.

Text = Switch(
    Language(),
    "en", "Welcome to Power Apps!",
    "fr", "Bienvenue dans Power Apps!",
    "es", "Bienvenido a Power Apps!",
    "de", "Willkommen bei Power Apps!",
    "Welcome to Power Apps!"
)

Where,

  • “en”, “fr”, “es”, “de” = Different types of language codes
  • “Welcome to Power Apps! = Default greeting [If user’s browser language does not match the above-specified languages]
PowerApps Language Function

2. Now, preview the app; the text label will display the text in the English language [user’s browser language], as shown below.

How to use Power Apps Language Function

I hope you find this article helpful. This Power Apps article provides detailed information about how to use the Power Apps multilingual languages to build an app and how to work with Power Apps coalesce. We also covered the four different ways to make PowerApps multilingual applications.

Also, you may like:

  • I highly miss how you would translate and deal with choice and choices fields? I mean not the label of such a control but with displaying the options in it in the desired language. How to filter, how to set the value correctly, when the choice/choices field is bound to a SharePoint List or Dataverse.

  • >