Skip to main content
November 14, 2011
Question

Can I get the language from device?

  • November 14, 2011
  • 1 reply
  • 2652 views

with the adobe packager 3.0 can I get the language from device?

thanks

This topic has been closed for replies.

1 reply

November 16, 2011

no reply?

Inspiring
November 18, 2011

You can get the devices "Language" setting by looking at the first element of the array returned by Capabilities.languages.

Unfortunately the codes returned don't seem to always match the standard naming convention for language codes.

var languageSettings:Array = Capabilities.languages;

if ( languageSettings.length > 0 )

{

    if ( (languageSettings[0]).toString().toLowerCase() == "en-gb" )

    {

        // Do something based on the language being "British English" in this case.

    }

}

I still need a way to determine if the user is using Canadian English, but the device seems to only have 2 English settings (English and British English).

There is a Canadian "Region Format" setting also under Settings->General->International->Region Format, but I'm not sure how to access that information.

If anyone knows how to access the region format, I'd love to know.

Thanks.