Skip to main content
Colin Holgate
Inspiring
June 10, 2013
Question

how to know which app store the app came from?

  • June 10, 2013
  • 1 reply
  • 1003 views

Have any of you found a way to know what app store an app came from? Like, if it came from the US store I would use US English. If it's from the UK, Australian, or Canadian stores, I would use UK English. Same for other languages.

Knowing the system language isn't enough either, because that will only tell me that it's English, and not which English. Also, I need to know which particular Facebook or Twitter page to send the user to, in the cases where each country has their own page.

Thanks for any suggestions.

This topic has been closed for replies.

1 reply

Inspiring
June 11, 2013

I do not know of anyway to determine which store the app came from, but you can obtain the locale information from the device.

The locale info corresponds to the device's "Region Format" setting and can be used to determine what type of English you should be using.

                              var localeID:String;

                              try

                              {

                                             localeID = new StringTools(LocaleID.DEFAULT).actualLocaleIDName;

                              }

                              catch (error:Error)

                              {

       trace("Error obtaining region info = " + error.message);

                              }

You can then compare the value returned in the localID to the version of English you are looking for (e.g. en-ca, en-au, en-nz, en-ir, en-za, en-gb):

if ( localeID.toLowerCase() == "en-ca" )

{

       // Do something that is dependant on Canadian English.

}

The regional language settings can be found/changed on an iOS device at Settings->General->International->Region Format.