• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing the language at runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Changing the language at runtime (From: Alexandre Koff <email@hidden>)

  • Prev by Date: Re: Problems manually scrolling a view using mouseDown:
  • Next by Date: Re: index column in bound NSTableView
  • Previous by thread: Re: Changing the language at runtime
  • Next by thread: Suppression of bounds expansion upon call to scaleUnitSquareToSize
  • Index(es):
    • Date
    • Thread