Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPhone localization: Is it possible to translate nib files easily without having to copy the nib for each language?

I'm trying to find a manageable way to translate every visible string in an iPhone application. The official apple documentation says to use .strings files for programmatic strings, while using the built in "add localized file" option in xcode to localize nib files.

The problem i see with this is that if the UI needs to change after localization happens, then we would need to update the nibs for each language individually which is less than optimal. Is there a simpler way to perhaps tie strings displayed in nib files to relevant values in a .strings file? or would i have to programmatically have to set those strings for each ui element (which is slightly better but still annoying)?

like image 831
Kevlar Avatar asked Mar 06 '09 18:03

Kevlar


1 Answers

Apple's built-in command line program ibtool lets you do this. You can dump the strings from a XIB, localize them, then create a new XIB based on the existing XIB but using the localized strings. So you can always have a base set of XIBs and recreate them all whenever the localized strings change. More info here: http://www.bdunagan.com/2009/03/15/ibtool-localization-made-easy/.

like image 103
bdunagan Avatar answered Nov 14 '22 07:11

bdunagan