• 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: Douglas Davidson <email@hidden>
  • Date: Fri, 27 Jul 2007 09:39:20 -0700


On Jul 27, 2007, at 9:34 AM, Jeff Bland wrote:

In the preferences pane of my application, I'm trying to setup a language
option. The application uses NSLocalizedString() throughout - which of
course grabs the localized string for the most preferred language that my
application supports. Is there a way to have NSLocalizedString() or a
similar function read a string for a specific language regardless of the
preferred languages in the user preferences, such that when a user of my
application takes the language setting off "Default" and sets it on a
specific language - I can grab the localized strings for that language.


I realize I could locate the strings file for a particular language and
parse it myself, but if theres a way to get the system to do it, that would
be better :)

There's no specific API for this; you need to use NSBundle language- specific resource APIs to locate the strings file, but in order to parse it you can just read it as a property list, so it's really not much code.


Douglas Davidson

_______________________________________________

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


  • Follow-Ups:
    • Re: Changing the app language
      • From: "Jeff Bland" <email@hidden>
References: 
 >Changing the app language (From: "Jeff Bland" <email@hidden>)

  • Prev by Date: Changing the app language
  • Next by Date: Usefulness of a Cocoa DSP framework?
  • Previous by thread: Changing the app language
  • Next by thread: Re: Changing the app language
  • Index(es):
    • Date
    • Thread