Monday, 21 May 2012

Things learned about multi-language support (localization)

As I mentioned in previous post, like to share with you a few things I learned about multi-language support (localization) when I worked on V1.01 of Where Is It - Smart Kids Edition.

1. If you want to do it, make sure you got all the settings done in first version.

I learned this lesson in a painful way - as I originally planned about it, and created a "Localizable.strings" in Version 1.0 and put in all the key/string pairs in it, but then I totally forgotten about clicking on "+" to create localized version of the file. Therefore when I started adding in English, Spanish and the 2 Chinese versions in Version 1.01, I got a few problems:

a) the file location has changed. In Ver 1.0, the file is in the same directory as others. In Ver 1.01, each "Localizable.strings" file is located in it's own sub-directory (one each language). During testing, I found that if I installed Ver 1.0 and then upgrade to Ver 1.01, it will NOT pick up any of the different language versions, everything still in English. The only fix is to delete the app and then re-install Ver 1.01, which is not a good user experience.

b) I added a few extra key/string pairs in Ver 1.01. Because those upgraded ones will only see the Ver 1.0 file, those new ones were not correctly displayed. For example, I have these 2 new ones added in Ver 1.01. Those who upgraded from Ver 1.0, will get "AppTitle" and "AppTitleSub" displayed instead of the actual string defined.

"AppTitle" = "Where is it?";
"AppTitleSub" = "Smart Kids Ed";

2. Different width problem.

Make sure you check each and every string display in all screens for different languages. Due to difference in length of each string, although you may set the label to auto adjust font size to fit width as below, it's better if you actually check it to make it doesn't get chopped off, go beyond screen width, too small, ...etc.

[mLabel setAdjustsFontSizeToFitWidth:YES];

3. Custom font problem.

I added a few special custom fonts at the beginning, but I found that most fonts only support standard English alphabets. As shown below in first screen below for Spanish version, instead of "Puntuaci√≥n", that special "√≥" is shown as a blank box, and quite a few others as well. The second one for Chinese is even worse, lost everything. In the end, I have to switch back to standard Apple system fonts. But as I am also supporting pre iOS5 versions, have to add extra logic to use a "nicer" font in iOS5, and then different one for older iOS version.

4. Issue with Simulator

I also found that during testing, if you start a test run in Simulator straight from Xcode, then click "Home" to stop it, and then change language on the Simulator, quite frequently it will hung and crash quite badly. The work around I found, is to make sure it's stopped in Xcode first, switch to Simulator to change the language, then switch back to Xcode to start the run.
Also occasionally, I have to select "Clean" to clear everything for the build to pick up the changed language, which is a bit annoying...

5. Hard to tell whether it's right or wrong unless you understand the language.

Another problem I found is, because I don't understand the language, I have absolutely no idea whether it's correct or not - specially when I have to make changes to the string file. For example, due to screen width limitation, I have to merge a few lines and split a few others. I accidentally missed an "o" during the copy-and-paste, and I got absolutely no idea about it until been picked up by others about a week later. Luckily that was before I submit to Apple for approval...

If you need help with translation, better find someone who can speak/read the language. Although Google translation is free, from my experience, the quality is not that accurate sometimes, so don't fully rely on it. There's a web site called iCanLocalize which provides professional translation service, but it's not free.

6. Don't forget about the content in iTunes Connect

Now that you spent the effort in putting in multi-language support for your app. Don't forget to add those different languages in your iTunes Connect setting too! The descriptions, the screen captures, ...etc, not a simple task... I have to admit I don't have the time to finish that part myself :-( ....

7. Don't forget about the culture differences

This is actually from another game I am currently working on. I found that I made a dumb, fundamental mistake by trying to add multi-language support to a game which requires players to work on things based on the 26 English alphabets.... I later realised Spanish or German or French speaking people's alphabet would be quite different from the English one, right? Then what's of point of supporting it in non-English language? Silly me....

So based on above, although Apple has made it quite easy to support multi-language in Xcode, there's still quite a lot of effort involved. To make your life easier,  make sure you try it a few times (try this tutorial) and arrange for all required resources before you start integrating multi-language support in your app.

Hope you find these information helpful and let me know if you have other things to share.  Cheers!

[Update 22/05/2012]
Almost forgotten another one:

8. Game Center content

Inside Game Center achievement and leaderboard setup (also through iTunes Connect), there's also content that can be in multiple languages. So you might have to look into that too.

[Update 13/09/2012]
There's also other stuffs like Storyboard in iOS5, as I never use Storyboard, don't really know much about it. Please have a look at this post for other related info.

Thursday, 17 May 2012

"Where is it smart kid ed" Ver 1.01 published

Version 1.01 of my "where is it smart kid edition" is now available in the app store.

The main change is supporting multiple languages (Spanish, simplified and traditional Chinese). Learned quite a few things during the process and will share with everyone later.

The time is roughly the same as before:

A high level time line:(Sydney time)
10/5 (Thu) 2x:xx submitted app (sorry I forgot the time of submission :-P )
10/5 (Thu) 23:18 received email saying app status is "Waiting for Review"
17/5 (Fri) 09:25 received email saying app status is "In Review"
17/5 (Fri) 10:32 received email saying app status is "Processing for App Store"
17/5 (Fri) 10:37 received email saying app status is "Ready for Sale"

Updating blog from safari/iPhone is really, really, clumsy.... Noticed there's a blogger app for android, how come there isn't one for iOS?

Monday, 7 May 2012

Other info about App Submission

Was studying about the App Submission process. At first I thought it shouldn't really matter if you submitted to App Store with some test/incorrect info or screenshots as no one would know it any way. After it's been approved, you can still have plenty of time before you actually do any marketing stuff to tell everyone about your app, right? WRONG!

Have a look at the following screenshots, which automatically picks up info about new apps from App Store - still contains the 1st draft info I put in at the beginning. A few of the links: gamespot augamefaqs,  metacritic, app spy, ...etc

So, based on all these info, make sure you got all the details (description, keywords, screenshots, ...etc) about your app ready before you update it in iTunes Connect!

Sunday, 6 May 2012

Further Info about my first app

As mentioned before, further info about my first app is as below. Please click here for the link.

It's based on the Cocos2dDiceInCup project, but added lots of extra stuffs:
1. 2 players mode
2. Multi-players mode (through Nextpeer)
3. Game Centre support
4. Allows users to change to different characters
5. Bonus for faster action
6. Email support
7. Supports iPhone/iPhone Retina/iPad/iPad Retina

You can also have a look at the Nextpeer Leaderboard from this link.

Please have a try and send me some feedback. I am currently working on V1.01 with extras... Will let you know when it's published.

How to force OS X Preview 5.5.1 (719.16) to "refresh"?

I was using my iPad2 to capture some screen dumps from my App. But I found that when I tried to use Preview (Version 5.5.1 (719.16)  running on OS X 10.7.3) to "Import from iPad2", the displayed content never change even if I made quite a few changes on the device (new images been created or old ones been deleted). Which means the latest updated images can't be imported to my MacBook.

There must be a time-out or cache refresh interval period defined somewhere, but how long do I have to wait or how can I force it to refresh?

I tried disconnect the USB cable and reconnect again, still the same. Tried deleting some images from within Preview, still the same.

Very strange, and I can't find any function in Preview to force it to refresh/reload. Quite annoying, I guess the last option is to restart my MacBook Pro (Update: yes, restart did force it to refresh). But that's quite dumb if you have to reboot your Mac just to refresh Preview??

Any one got similar problem or have any idea how to fix this?

Friday, 4 May 2012

TexturePacker to the rescue!

I found that in the past, during the development with my apps, a lot of time were spent working on the images/graphic. With 4 set of files - iPhone, iPhone Retina, iPad and the new iPad Retina, it's very painful as every time I change sometime or made a mistake, I have to repeat at least 4 times. Also, as there were so many individual files, managing them was really a nightmare as I have to make sure the correct image file been placed in the right directory...

After I followed a few of Ray Wenderlich's tutorials, I decided to give Texture Packer a try and found that it really saved me lots of time.

First of all, with the scripting capability, it automatically checks and packs all the relevant image files into as many sprite sheets as required (I split it into 2 for each device to make it smaller)

Secondly, if you use the compressed PVR format (.pvr.ccz), using Cocos2D as example, there's only 1 sprite file to worry and it's much faster to load and compact in size.

Plus with the scale/autosd feature, I can half the number of images - only the Retina version is required - as Texture Packer can automatically scale it down for me. And this is the best part I like.

A few other things I learned during testing with TextPacker to share with you:

1. If you get this error saying "cocos2d: TexturePVR: Error uploading compressed texture level: 0 . glError: 0x0501", that might be due to your sprite file sizes were too big. Suggest to split it into 2 or 3 more smaller files.

2. It's very easy to get file sizes over the 2048x2048 default for iPad/iPad Retina ones. So better adjust it in the script to allow 4096x4096 as width/height.

3. To use script to run TextPacker, you have to setup another Target. Once that's done, if you have to add files to your project, make sure you "tick" the check box for your project at the bottom window when Xcode asked you would you like to copy the file(s) over. I had some trouble with some font files which I forgot to tick the check box, and no matter how I change the code it just won't use the new font. Took me a long time to figure out it's because of that.

Hope you find these information helpful, and join the club to enjoy the convenience this handy tool could bring to you!

Thursday, 3 May 2012

Yes! My first app approved!

It seems to be a lot smoother/faster than I have expected. Received an email saying my app has been approved! What? I wasn't even ready for it yet!?

A high level time line:(Sydney time)
26/4 (Thu) 22:00 submitted app
26/4 (Thu) 22:27 received email saying app status is "Waiting for Review"
3/5 (Thu) 10:16 received email saying app status is "In Review"
3/5 (Thu) 11:24 received email saying app status is "Processing for App Store"
3/5 (Thu) 11:27 received email saying app status is "Ready for Sale"

Whole process about one week (6.5 days?). The last email also said it may take up to 24 hours before the app is live in the App Store.

So it takes less than hour to review an app - won't be too surprise with that as my app is very simple and they must have received thousands of submissions everyday.

Any way, will wait for it to become live. Now it's time to think about what to put in to fix those screen captures which wasn't done properly before...

What a relief... Never expect it to be approved on first submission. Not bad for a first timer. Let me know if you got more "exciting" experience with your first app submission to share.