I'm working on a app that supports multiple language. Everything is going well. But I need to change the language during runtime.
I'm doing it this way -
NSArray* languages = [NSArray arrayWithObjects:@"es",@"en" nil];
[[NSUserDefaults standardUserDefaults] setObject:languages forKey:@"AppleLanguages"];
[[NSUserDefaults standardUserDefaults] synchronize];
It is working well.
NSString *langID = [[NSLocale preferredLanguages] objectAtIndex:0];
This langID
is showing the correct language. But the app is not changing its language until its been restarted.
Is there any way to refresh localizable.strings file or NSLocalizedString(key, comment)? Or any other way to do it without restarting?