views:

348

answers:

2

I've added several localization files (for several languages) to a xib. Do I also need to do the same for all other xibs?

Should I just make all of my labels IBOutlets, use NSLocalizedString in the related .m files that will assign values to the labels? Then I wouldn't have to create all of these localization files. At least for the xibs that I can related .m files.

A: 

Well, you can also consider to create an localized.strings file, and place the translations by code so you don't have to copy that multiple times (I don't know if that's really, but if). You can make a NSObject which inits when your App starts or do this by your AppDelegate.

Tim van Elsloo
localized.strings is good for .m files but how does that work with xib files?
4thSpace
Edited OP for another suggestion.
4thSpace
A: 

Whichever makes the most sense for your project. Sometimes you need to re-position UI elements because a word in one language is much longer in another (I'm looking at you, German), while other times it doesn't matter. Either approach works.

Jeff Kelley