Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting user's locale in Adobe Flex

I am working on an AIR desktop application, and am trying to get the user's locale string. I basically need to know whether the user's locale is English or French. Capabilities.language doesn't seem to work for me, as it only displays the OS's UI language.

How can I get the user's current locale?

Once determined, I intend to set it to resourceManager.localeChain, so that the appropriate 'properties' files are used to display my UI literals.

Thanks in advance!

Pritin

like image 485
Pritin Tyagaraj Avatar asked Apr 07 '26 03:04

Pritin Tyagaraj


1 Answers

Getting the users locality is nothing trivial. All websites has had this problem, which is why they always ask you where you're from and which language do you want it to be. This is no different in Flex.

Even with a way to detect the locale I would keep some sort of 'language bar' somewhere for the user to easily change his/her settings.

like image 79
J_A_X Avatar answered Apr 09 '26 18:04

J_A_X



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!