I am trying to translate my app into multiple languages. For this I am planning on reading from text values from a SP list depending on which locale it is. But I need to detect what is the current locale first. Users can access the app using
1. A standalone link
2. Embedded in a SP Online page
3. Native PowerApp App
I am using the Param("locale") or Language() to get the value.
For 1), since I can control the URL freely, I can just put in locale=en-US or locale=fr-CA in the URL which seems to work.
For 2), Since it cannot read URL params from the parent frame, I can't control it there, but Language() seems to read it fine from the inner iframe URL. Does this value get set from the browser/OS locale setting?
For 3), I notice that the Param function gets an empty value, but Language() gets me "en". Is this a reliable way to check? Seems like "en" is just the default value it gives when it can't get any value. So someone in say a french region could still get "en".
How can I get this working accurately?