tags:

views:

78

answers:

1

I know you can localize a NSString or even an image (which is pretty cool), but can you localize a label that is text in the iPhone SDK?

A: 

If the label is part of a XIB, you localize the XIB. If it's programmatically created, then you localize the NSString.

Rob Napier
ah, it's a label in the XIB (IB). Can one easily import the characters for Asian languages into the XIB(IB)?
HollerTrain
Select "Get Info" for the XIB and "Make Localizable." You then create a new XIB for each language. This is somewhat more complex than managing a single XIB, but allows you to lay out the UI to look ideal in each language. English is "larger" than Mandarin, for instance, and "smaller" than Russian, so each language may need a different layout to look best. RTL languages like Hebrew require even more thought to keep beautiful. That's why it's not automatic. You can of course make it automatic by setting all the labels in code, but it won't necessarily lay out as well.
Rob Napier
To the original question, you can definitely enter Asian languages directly into the XIBs.
Rob Napier
awesome Rob. You are so kind. This will really help me out :) Now I just need to figure out how to enter the languages and I'll be set.
HollerTrain
i've set the localization to the four supported types. when i'm in IB how do i bring each one of those up? or how do i create them in IB if the files aren't already created for me?
HollerTrain
nm, found amazing tutorial here: http://adeem.me/blog/2009/05/09/tutorial-iphone-localization-in-xib-nib-files/
HollerTrain