cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PierreBreau
Regular Visitor

Set Language from DropDown on AppStart

I am building an app in power apps, I have a dropdown which toggle the language from French to English, this part works fine. My problem is when the app starts there is no language selected so all my labels for example are empty even tough the Dropdown is set to English. 

 

This is the OnChange code of my dropdown:

 

Set(gblSelectedLocal, ddlLanguage.SelectedText.Title); 
UpdateContext({gblSelectedLocal: ddlLanguage.SelectedText.Title}); 
lblSelectedGlobal.Text = gblSelectedLocal;

so I try adding this code to the OnStart of the app but nothing is happening. I also try setting up the glbSelectedLocal variable on start as well but it seems like the OnStart function does nothing. 

 

Anyone have a good way to approach this? I'm new to PowerApps as well. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PowerAddict
Super User II
Super User II

@PierreBreau I just tested it out and it works fine. So I am curious as to why it isn't working for you. Can you try this code in the OnVisible of the screen where you have the dropdown? I want to first make sure that it works for you. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

View solution in original post

2 REPLIES 2
PowerAddict
Super User II
Super User II

@PierreBreau I just tested it out and it works fine. So I am curious as to why it isn't working for you. Can you try this code in the OnVisible of the screen where you have the dropdown? I want to first make sure that it works for you. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

View solution in original post

PierreBreau
Regular Visitor

I ended up creating a page with a language selection button. When the user click the button it set the variable and then bring them into the app. 

 

Sorry for the late reply on this and thanks for trying to help

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (46,864)