Re: Changing the language at runtime
Re: Changing the language at runtime
- Subject: Re: Changing the language at runtime
- From: Douglas Davidson <email@hidden>
- Date: Mon, 24 Jan 2005 13:34:27 -0800
On 2005-01-24 11:28:21 -0800 Alexandre Koff <email@hidden> wrote:
Is there any way to change the language at runtime so that for
instance once the user clicks on a button the application knows to use
another resource file?
Obviously using NSUserDefaults to change the value for
"AppleLanguages" will only take effect once the application restarts.
Is the best way to change that value and then restart the app or is
there a way to do it without restarting the application?
NSBundle does not have any mechanism for this. Generally many
localization-dependent resources are loaded at launch time and never
reloaded, so changing the current localization would produce a
partially relocalized application. For that reason it is not
supported.
However, this applies only to uses of the automatic bundle
localization mechanisms. It is always possible to use NSBundle's
localization-dependent APIs, and in that case you can use whatever
means you like to choose the localization.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden