Hi, I use the code below. Petr

var lang:String = Capabilities.language!="xu" ? Capabilities.language :
GetBrowserLanguage();   

public static function GetBrowserLanguage():String 
{
        var result:String = "";
        try {
                var language:String =
ExternalInterface.call("function(){return (navigator.language ?
navigator.language : (navigator.userLanguage ? navigator.userLanguage :
''));}");
                if (language.length > 1) {
                        result = language.substr(0,2);
                }                                       
        } catch (error:Error) {
                // nothing to do...                             
        }                                                               
        return result; 
}       

-----Original Message-----
From: Harbs [mailto:[email protected]] 
Sent: Wednesday, December 02, 2015 8:48 PM
To: [email protected]
Subject: Re: Getting user's locale settings

In AIR you could use Capabilities.languages

In Flash you have Capabilities.language, but that's not as good.

On Dec 2, 2015, at 9:32 PM, mark goldin <[email protected]> wrote:

> Is it possible to get into a Flex application user's locale settings 
> such as a current OS's language?
> 
> Thanks

Reply via email to