Piyush Dwivedi
Piyush Dwivedi

Reputation: 31

I want change my own app language on button click in iOS

if(btn.tag==1)
{
    [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"en", nil] forKey:@"AppleLanguages"];
    [[NSUserDefaults standardUserDefaults]synchronize];
}else{
    [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"ar", nil]  forKey:@"AppleLanguages"];
    [[NSUserDefaults standardUserDefaults]synchronize];
}

but it's not changing language for the first time first I select language and restart the app then it change the language but not change for the very first time

Thanks

Upvotes: 1

Views: 1339

Answers (1)

Ńike Kamstra
Ńike Kamstra

Reputation: 157

I don't think you can change the language, once it's set. Thats why you get it right, after the next time you launch the app.

If you already knew this, then please explain your question a bit more.

Upvotes: 1

Related Questions