Re: International strings
Re: International strings
- Subject: Re: International strings
- From: Douglas Davidson <email@hidden>
- Date: Fri, 3 Aug 2001 14:39:12 -0700
On Friday, August 3, 2001, at 11:18 AM, Christian Mike wrote:
Is there any way to do this programmatically so that my program (and
system)
can be running in English but pull out another language's strings upon a
rare occasion?
Yes, but it's not quite as convenient. You will need to locate the
relevant strings file (using -[NSBundle
pathForResource:ofType:inDirectory:forLocalization:] with the
localizationName argument set to the name of the .lproj you are
interested in, minus the .lproj extension), create a property list from
it, and get the string you are interested in from that. NSBundle does
all of this for you, and caches the contents of the file, for strings in
the localization the application is running in.
There might be alternatives to this, though--what is the occasion you
imagine for switching localizations?
Douglas Davidson