Re: Changing the app language
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