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:
[EDIT: And here is a web service that might be worth your looking into!]Continue Reading →