Boon
Boon

Reputation: 41510

iOS: Is it possible to override the locale set on the phone and make it use a strings for a different locale?

In iOS, is it possible to override the locale currently set on the phone and make it use a strings for a different locale in my app?

Upvotes: 1

Views: 5334

Answers (1)

Legoless
Legoless

Reputation: 11112

In short: Yes.

The NSLocalizedString is a macro, which you can replace with your own macro and do the language loading yourself. This might require setting most of the strings in code though and you will not be able to use them in Storyboards.

However, changing the locale manually in NSUserDefaults works if you want to change the locale.

The answers below explain more on this topic:

Upvotes: 5

Related Questions