Search code examples
iphoneiosxcodelocalizationnslocalizedstring

Localisation of iPhone App - Letting User Choose Language


I understand how to localise an app and that the language displayed is based on the users language / region choice in their phone's settings.

My question is, what if I want to let the user choose the language in the app itself, rather than default to what is set in the settings (e.g have a screen where the user chooses a language).

Am I ok to take this approach ? And could I use the existing localisation process (i.e of having a plist with string and using NSLocalised string ?) somehow ?

Thanks !


Solution

  • Of course you can do that. You can make a screen, sort of a settings screen where user gets to choose the language. You then take the selected language and store it in NSUserDefaults.

    Then, you can make a static method that takes a string key as a parameter and based on the selected language returns the appropriate value from one of your language files.