NSString *NSLocalizedString(NSString *key, NSString *comment)
Example: (will look for the localized text in default Localizable.strings)
NSString *toDisplay = NSLocalizedString(@"explode_soon", @"Explain that the computer is going to explode");
# generate a new file: Localizable.strings, with keys in alphabetical order $ genstrings *.m
Compare two .strings file (display deleted and added keys). Example:
$ ./diffstrings.py English.lproj/Localizable.strings Localizable.strings *** Deleted keys *** message.undo.flag_operations message.3.error.duplicated_entries %@ message.2.warning *** Added keys *** message.1.info.importing %@ category.default.new
Pb: every modification if the reference NIB will also have to be done to other NIBs (adding an outlet, a button..) and you'll have to make sure not to forget any text in the NIB..tedious.
First:
nibtool -L French.lproj/MainMenu.nib > MainMenu.strings
nibtool -d English.lproj/MainMenu.strings French.lproj/MainMenu.nib -W English.lproj/MainMenu.nib
For any modifications to the reference NIB:
nibName=DetailsWindow
nibtool -d English.lproj/${nibName}.strings French.lproj/${nibName}.nib -W English.lproj/${nibName}.nib
Pb: there shouldn't be any difference accross NIBs but text. In particular, every element (button, text field) should have the same size accross the NIB files. So, make them big enough in the reference NIB!
Note: in the code above, the French NIB is the reference.