3
votes

I'm currently working on converting an Android app I built natively as an iPhone app. I'm recreating it in Flash as I know AS3 but not Objective C. My original Android app is localized for 4 different languages (it's so easy to do with Android!) - and my question is - how would I do this for the iOS version from Flash? Would I be able to use separate XML files with all the strings in each language and load them in after somehow detecting which language the user's device is set to?

Many thanks!

SOLUTION

It was easy! Thanks to crooksy88's link, I ended up using the following code:

var languageSettings:Array = Capabilities.languages;
var locale:String = languageSettings[0].toString().toLowerCase();

This gave me a 2-letter language code: 'en' for English, 'de' for German, etc. which I was able to use to load the correct xml file for each language. Very simple in the end :)

1
Something is not right here! Flash for iOS? since when did iOS supported flash?!Ali
You can use Flash 5.5 as a tool to make apps for both iOS and Android.Emma Assin
Didn't know that! And appstore would approve that? or this is just for entreprise distribution?Ali
Totally fine with the Appstore! And basically very very simple to do (until you run into problems like the above) :)Emma Assin

1 Answers

1
votes