web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Implementing translati...
Power Apps
Unanswered

Implementing translations to canvas apps with Excel and JSON

(3) ShareShare
ReportReport
Posted on by 287
Hi community,
 
I am building a canvas app that's pretty large. Previously, I used a Power Apps component library to store translations of labels for different languages following this tutorial: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/multi-language-apps. It worked fine until I had 1300+ translations for 2 different languages and the component library became really, really slow to edit and publish.
 
I have now decided to take Excel as the top alternative for the component library. Other users could easily manage it and it's much easier to use overall than Power Fx.
 
So far, my solution is the following:
 
Translations created in Excel for 2 languages (in the future more languages are easy to add as new columns)
 
The Excel is imported to a canvas app and the data loaded into a variable as follows (Table1 is the Excel table). This is now an UntypedObject in Power Apps.
Set(
    lblSample,
    ParseJSON(
        "{" & Concat(Table1, JSON(Key) & ": " & JSON(en), ", ") & "}",UntypedObject
    )
);

I am then referring to all my text labels such as varSample.lblApproval, varTranslatedLabel.lblDetails, etc. This is something I want to keep because my main app has thousands of labels and I don't want to change the way how the translation is referenced in them.
 
The problem is the UntypedObject. I want all my labels in the app to be text type. I could just use the Text() function but then I have to do that in thousands of places so it's not viable.
 
How could I convert my variable to a recognizable object without having to change so many things in the app?
 
Thanks in advance!
 
 
 
Categories:
I have the same question (0)
  • MS.Ragavendar Profile Picture
    6,334 Super User 2026 Season 1 on at
     
    On the App (On Start) Property - try setting the value 
     
    Set(
        lblSampleTemplate,
        {
            lblApproval: "",
            lblDetails: "",
            lblPeople: "",
            lblRelations: "",
           // Add other columns accordingly.
         }
    );
     
    On Respective Screen visible 
     
    Set(
        lblSample,
        Patch(
            lblSampleTemplate,
            With(
                {
                    _parsed: ParseJSON(
                        "{" & Concat(
                            Table1,
                            JSON(Key) & ": " & JSON(ThisRecord[varLanguage])
                        ) & "}"
                    )
                },
                {
                    lblApproval: Text(LookUp(RecordFieldValues(_parsed), Name = "lblApproval").Value),
                    lblDetails: Text(LookUp(RecordFieldValues(_parsed), Name = "lblDetails").Value),
                    lblPeople: Text(LookUp(RecordFieldValues(_parsed), Name = "lblPeople").Value),
                    lblRelations: Text(LookUp(RecordFieldValues(_parsed), Name = "lblRelations").Value),
                    // Add other columns accordingly.
                }
            )
        )
    );
     
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    ✅ Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    Out of curiosity, why use JSON?
     
    I tried simulating this using a collection
     
    ClearCollect(colTranslations,
       {Key: "Greeting1", English: "Hello", Spanish: "Hola", French: "Bonjour"},
       {Key: "Farewell1", English: "Goodbye", Spanish: "Adiós", French: "Au revoir"}
    );
    Set(UserLanguage, Language());
    ClearCollect(
        TranslationsCollection,
        AddColumns(
            colTranslations,
            Translation,
            Switch(
                UserLanguage,
                "en-US", English,
                "fr", French,
                "es", Spanish,
                English // Default fallback
            )
        )
    );
     
     
    and was wondering if there is a problem with my approach that I am not understanding.
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard