Register/Set a new language default
Posted
by mongeta
on Stack Overflow
See other posts from Stack Overflow
or by mongeta
Published on 2010-02-22T08:04:53Z
Indexed on
2010/05/10
15:44 UTC
Read the original article
Hit count: 392
iphone
|nsuserdefaults
Hello,
My app has some languages that the user can change whenever wants.
The problem is that always uses the current device language selected, so at least my localizable strings are working as expected, but no matter wich language I set, I'm getting alwats the default selected of the device.
Where I have to call this code?
[[NSUserDefaults standardUserDefaults] registerDefaults:
[NSDictionary dictionaryWithObject:[NSArray arrayWithObjects:@"ca", @"en", nil]
forKey:@"AppleLanguages"]];
Currently I'm calling from the AppDelegate implementation file:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
Thanks,
r.
© Stack Overflow or respective owner