I am doing multi language app
What I did is, I used two buttons, one for English and One for Arabic
On respective button actions, I am changing my app language. Following is the code for the same
-(void)changeLanguageFunctionEnglish
{
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"en", nil] forKey:@"AppleLanguages"];
[[NSUserDefaults standardUserDefaults]synchronize];
}
-(void)changeLanguageFunctionArabic
{
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"ar", nil] forKey:@"AppleLanguages"];
[[NSUserDefaults standardUserDefaults]synchronize];
}
But to reflect this language change I need to restart my app. I don't want to do this restarting. Do anything available, which will fire at the end of the method and my application will get relaunched/restarted once the method execution is done.
Thanks in advance.
I just need to relaunch/restart the app once the language change method is executed.