• 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 app language
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the app language


  • Subject: Re: Changing the app language
  • From: Alastair Houghton <email@hidden>
  • Date: Sat, 28 Jul 2007 09:55:09 +0100

On 28 Jul 2007, at 03:59, Jeff Bland wrote:

I played around with the AppleLanguages thing a bit:

[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObject:@"English"] forKey:@"AppleLanguages"];
[[NSUserDefaults standardUserDefaults] synchronize];


This indeed changed the application language off my system default language, and worked exactly as expected with one exception - it doesn't take effect until the application restarts.

Yes, that's correct.

I suppose some internal settings need to be flushed or something for NSLocalizedString to update the strings file it reads from, I don't know how or if it's possible to change that.

Not as far as I'm aware, though I haven't checked.

Alastair asked my reasons for supporting such an option. I don't have a particular need for it in my current project - it's just a feature that I like and want to include. Which should be enough reason.

Well no, not really. The user expects to be able to set his or her language setting in System Preferences, and if individual applications need to be altered to behave differently, as Charles Steinman pointed out, there is Finder's "Get Info" panel.


If you're going to duplicate existing system functionality like this, you need to have a good reason for doing so. I can think of a few reasons that you might need to mess with this (e.g. bootable CD environments, restricted environments such as kiosks, apps for localization courses, demos), but you really shouldn't be doing this for an ordinary application.

In this case, either behavior listed above is acceptable since it's not vital to the program, but I'm still gonna play with NSUserDefaults some more.

Kind regards,

Alastair.

--
http://alastairs-place.net


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Changing the app language (From: "Jeff Bland" <email@hidden>)
 >Re: Changing the app language (From: Douglas Davidson <email@hidden>)
 >Re: Changing the app language (From: "Jeff Bland" <email@hidden>)
 >Re: Changing the app language (From: Brian Willoughby <email@hidden>)
 >Re: Changing the app language (From: Alastair Houghton <email@hidden>)
 >Re: Changing the app language (From: "Jeff Bland" <email@hidden>)

  • Prev by Date: Re: Quickest Drawing Method
  • Next by Date: Sending message to Objective-C object from C file
  • Previous by thread: Re: Changing the app language
  • Next by thread: Re: Changing the app language
  • Index(es):
    • Date
    • Thread