assume I have an app that is translated in German and English as default. It is now opened on a device with French locale. Since there is no French translation available, the app will fallback to English. How can I determine that language? I don't mean system language, but the actively displayed one. I found that post, which is a nice workaround but is there a better way?
I need to request data in the appropriate language from a server and it doesn't make sense to get that data in a different language than the app uses.
Further thoughts: Maybe there is no such method as it cannot be clearly defined what the display language is, as the language fallbacks are handled per string. E.g. what would be the display language if 50 percent of the strings are translated and 50 % will default to a fallback? However, it would be nice if there would be a method that at least tells us the first fallback language for which there is at least one translation.
Any tips, thoughts, experiences are welcome!
Edit: I need to get the displayed language programmatically