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

Notifications

Announcements

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
    4,983 Super User 2025 Season 2 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,847 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard