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?
Asked
Active
Viewed 5,256 times
1
-
In production or development? – JuJoDi Mar 31 '14 at 20:04
-
@JuJoDi Both prod and dev. – Boon Mar 31 '14 at 20:31
1 Answers
5
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:
-
I appreciate you answering the question with multiple posts rather than downvoting it or marking it as dupe. Very helpful! – Boon Mar 31 '14 at 20:08