Asha
you should probably send the mail again with the
discuss-gnustep@gnu.org mailing list in Cc: ... I expect
quite a few people on the mailing list should be able to look at the code and respond ;-)
That way you may get a faster response ... I'm too busy with things at work today to look at the code. I may
manage tomorrow. But if you send to the list, chances are someone else may have time *right now* :-)
Thanks
On 17 Aug 2010, at 23:21, asha murthy wrote:
> Hi Nicola,
>
> I am doing the following(as in attached) from my main.m.
>
> However the NSLanguages value for the application domain is changed and not the value for NSLanguages in
NSGlobalDomain. Hence the application strings appear still in English.
>
> Could you please have a look and let me know how I could modify the NSLanguages value for the NSGlobalDomain from the main.m.
>
> Thank you very much,
> Asha
>
>
> --- On Fri, 8/13/10, Nicola Pero <
nicola.pero@meta-innovation.com> wrote:
>
> From: Nicola Pero <
nicola.pero@meta-innovation.com>
> Subject: Re: Problem running hello-objc-gnustep example in gettext
> To: "asha murthy" <
spotasha@yahoo.com>
> Cc: "
gnustep-dev@gnu.org Developer" <
gnustep-dev@gnu.org>
> Date: Friday, August 13, 2010, 3:43 PM
>
>
> On 13 Aug 2010, at 02:50, asha murthy wrote:
>
> > Hi Nicola,
> >
> > Thank you very much for your kind reply.
> > defaults write NSGlobalDomain NSLanguages "(Language)"
> > The above command works for me from command line!
> >
> > Now, I would like to use this command from my application *.m file.
> >
> > Is there any way to do this?
>
> Hi Asha
>
> I think the idea is that your application could run in different languages, and the user would select
> which languages (using 'defaults write ...', or using Preferences.app) he prefers before launching
> the application
;-)
>
> By the way, 'defaults write ... ' writes your preferences permanently to disk; you can reboot your computer
> and your preferred language will still be there - if you selected a language there (eg, French) all GNUstep
> applications should start up in French, and even if you log out or reboot, they will still come up in French :-)
>
> Anyway, you can still change the language in main.m if you have a reason to do so (I can't really think of a reason,
> but presumably you have one). You need to use NSUserDefaults to do the equivalent of setting
>
> NSLanguages = (French, Italian)
>
> (for example) from the shell (note that the value is an NSArray). Check the NSUserDefaults documentation
> for an explanation of the API. :-)
>
> Thanks
>
> PS: You can also specify NSLanguages on the command line (for a specific
application) if you want, as in
>
> openapp MyApp.app -NSLanguages '(Italian, French)'
>
> (warning: I haven't tested this command, it may contain a typo)
>
> <SetDefaultLanguagetoGerman.rtf>