Tips: Localization

Heh. This fellow with, apparently, way too much time on his hands went digging around in AppKit and found out that there’s an undocumented call _NXKitString that lets you cheat on your localizations by accessing AppKit.framework’s tables directly.

Now, we really really don’t recommend you ever ship anything using that, but it is interesting to note the source of these tables:

To see what’s there, navigate to the following location:


From there, you can navigate into the English.lproj directory, for example, where you’ll see a list of string table files, all of which have the suffix “strings”. These represent the allowable table names that you pass to _NXKitString. So, “Preferences” maps to Preferences.strings and so on.

So not only can you save yourself some pennies on your own translation costs by digging through there, far more importantly, for any particular string that happens to be there, you can get The Official Apple-Approved translation … as opposed to the real howlers completely inconsistent with the rest of the system that your commissioned translators have a way of throwing at you, one finds on occasion. Because they always claim yes we are completely familiar with Apple conventions in all the languages you want … but that does not always turn out to indeed be the case.

While we’re discussing localization, if you have 23 localizations to spit out RIGHT NOW! like some of us do, here is a new addition to our Invaluable Development Tools list, LangSwitch:

The only boring and time-consuming solution is to thoroughly test the new UI in every localization before releasing. This is especially time-consuming as you have to change the language settings in System Preferences every time you want to change the localization.

Also, another downside of this is that it changes your whole computer (well, just your session, but whatever…). I personally don’t really like to use a computer in Chinese…

That’s where LangSwitch comes in… It gives you a simple GUI way to switch the localization for only the app you’re testing. It displays only the localizations avaiable for your app. Here’s an easy way to test your different localizations without the hassle.

Is that sweet, or what? Works just as described, and somehow manages to maintain the designated localization even after an Xcode Clean All and rebuild. Not completely sure just how it’s managing that, but it’s certainly a useful trick!

And here’s a useful little tip for the use of genstrings if you like, as we do, to organize your source in folders; this command will recurse two levels down your hierarchy to pull out all your source strings:

genstrings *[hmc] */*[hmc] */*/*[hmc]

To finish off, here’s a few other recent useful posts regarding localization you may wish to also read over if this happens to be a concern of yours at the moment:

ibtool: Localization Made Easier

Alex | May 6, 2009
  • Adeem Basraa May 10, 2009 at 7:38 am
    Please check out my two tutorials on Localizations. Part 1: Part 2:
  • Gareth May 18, 2009 at 12:24 pm
    Hi! Great tutorial! Scafell Software provide various levels of localization and internationalization services and very competitive rates. If you're thinking of localizing your application please get in touch so that we can talk over the options and help you out with the localization process.
  • Danilo Yasuno October 1, 2009 at 3:00 pm
    Hi there. I self recommend our translation service. We are offering translation and localization services for iPhone applications for only 0,08€ per word. We have a great experience in the iPhone and iPod touch app translations field. It is not a coincidence if DYS: Translations worked on more than 400 App Store applications since the launch of the App Store. For further information, please visit or contact me at Best regards, Danilo.
  • Omer Khan November 12, 2011 at 12:48 pm
    Hello ... I am new to iphone development. I need an explanatory tutorial regarding localization / internationalization for ios 5 xcode 4.2. Can you please help me out in this matter?
  • Alex Curylo November 12, 2011 at 12:53 pm
    Ray Wenderlich's site is your goto place for tutorials.

Leave a Reply