I am using localization for english and spanish language in my sample application. I have added Localizable.strings class for both english and spanish. I know it is possible to localized an image, XIBs and label text. But I would like to know that is it possible to localize an iPhone app without localized their XIB's, even what's the need to make XIB localized ? Or can we give the button title as NSLocalizedString(@"TITLE", nil) in Interface Builder ? I know this won't be proper way for doing this. Please suggest me for further proceeding.
Thanks.
Yes you can localize an App without localizing the XIBs.
You will need to create an outlet for every label, button, textview,...
Then in the viewDidLoad
set the correct localized strings:
-(void) viewDidLoad {
[super viewDidLoad];
self.nameLabel.text = NSLocalizedString(@"name:", @"name label");
[self.saveButton setTitle:NSLocalizedString(@"save", @"Save button title.") forState:UIControlStateNormal];
}
This is the way I do it, since changing all the localized XIB will just take to long and with autolayout you can make sure that everything will fit.