I am using Xcode 6 and iOS 8.1 deployment target. I added a localization for Portuguese from Brazil (pt_BR), xcode generated the localized file for storyboard and I translated all the strings. Even so, all the text is displayed in English. I've been fighting for days with these, but I still can not figure out why it does not work. Obs.: Other localizations, like French and German works, but not Portuguese from Brazil.
1
votes
1 Answers
0
votes
For some reason, iOS8 is using 'pt' for Portuguese Brasil (instead of pt_BR).
but, any way u can use following code for changing language.
if(IS_OS_9_BEFORE) {
if ([preferredLanguage isEqualToString:@"pt"]) {
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"pt-BR", nil] forKey:@"AppleLanguages"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
but, you should have to relaunch your application to effect these changes. thanks!