Reputation: 11
I have an issue with NSLocalizedString, I try to translate the text below which is located in one of the tab bar icons, but what only appears is Text_to
even after giving the equivalent in the other language in infoPlist.Strings
(file)
My code :
[[self.tabBarController.tabBar.items objectAtIndex:0] setTitle:NSLocalizedString(@"Text_to", nil)];
infoPlist.Strings (file) :
"Text_to" = "translated text is here";
Just for the info, I am working under xCode 5.0.2 and iOS7
Any ideas on how to solve it ?
Upvotes: 1
Views: 132
Reputation: 1057
In order to localise your strings you should add the to Localizable.strings file corresponding to the language you would like to translate.
Here is a quick overview from Apple about how to do it Localising Strings and also a tutorial to create a new strings file for your target language Creating string files
You must be sure your project has internationalisation on:
In your project navigation inspect if you've already create a strings files for your target language:
Upvotes: 0
Reputation: 873
Try putting it into the file Localizable.strings instead of infoPlist.Strings.
Upvotes: 1