objective c - Change locale for current iphone application (custom locale for NSBundle?) -


I want to change the local program in my iPhone app (basically because not all languages ​​are supported by the iPhone, Should the user be able to switch language only for my application). Have I looked at a different question on OSX apps? It should work with [[NSUserDefaults StandardUserDefaults] setObject: [NSArray arrayWithObjects: @ "de", nil] forKey: @ "AppleLanguages"]; - But this is not for me ... [NSLokel Movolocale] The system still gives a comprehensive local return and 'main bundle' gives me files from a wide location of the system ..

So .. my applications How to set a custom locale for? Or - that would be enough for me - create a new NSBundle installation with a different location?

OK, I'm stupid .. As the question has already been answered .. restarting that code Required to be used. I.e. when the user selects another language [[NSUserDefaults StandardUserDefaults] setObject: [NSArray arrayWithObjects: @ "de", nil] forKey: @ "AppleLanguages"]; - The next time the application was started [the NSBindal main bundle] will return the correct resource for the given location. (Although [NSLock Challenger] still the iPhone will return the wide locale .. But I think it does not make any difference to me Anyway ...)


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -