0

I am trying to change the language inside my app based on what the user decides. I have tried the following with no luck and was wondering if someone could help point me in the right direction?

A5omic
  • 55
  • 7

2 Answers2

0

You have to use localizable strings, kindly check the following link: Swift App localization

0

I was able to figure it out by removing the object value first before setting it. That enabled me to get the language to change in the app. Thanks everyone. Solution:

NSUserDefaults.standardUserDefaults().removeObjectForKey("AppleLanguages")
NSUserDefaults.standardUserDefaults().setObject(["de"], forKey: "AppleLanguages"   
NSUserDefaults.standardUserDefaults().synchronize()
A5omic
  • 55
  • 7