[Mono-dev] Mono.Unix.Catalog.Init where does it get the locale from?
Vladimir Dimitrov
vlad.dimitrov at gmail.com
Thu Mar 13 14:09:11 EDT 2008
Great I tested it and this works for me too :).
Do you think we should probably post this as a bug in bugzilla? And if yes
then how do we define it?
If you think this is not a bug but a practice that should be used then we
should probably post it on the Mono.Posix page so people would know this
next time.
Thanks,
Vladimir
-----Original Message-----
From: Jonathan Pryor [mailto:jonpryor at vt.edu]
Sent: Thursday, March 13, 2008 7:48 PM
To: Vladimir Dimitrov
Cc: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] Mono.Unix.Catalog.Init where does it get the locale
from?
On Thu, 2008-03-13 at 19:16 +0200, Vladimir Dimitrov wrote:
> Thanks for the quick answer I tried your suggestion and set the variable
> using this code:
>
> CultureInfo culture = new CultureInfo
> (config.Localization);
> Thread.CurrentThread.CurrentCulture = culture;
> Thread.CurrentThread.CurrentUICulture = culture;
> Environment.SetEnvironmentVariable ("LANG",
> config.Localization.Replace ("-", "_"));
What I've found is that setting LANG is not enough; in my own tests with
Catalog:
LANG=es mono foo.exe
is ignored, but
LANGUAGE=es mono foo.exe
works as desired (using the `es' message catalog). I don't know why
this is the case.
Consequently, I would suggest setting the LANGUAGE environment variable
and see if that works; it did for my test app.
- Jon
More information about the Mono-devel-list
mailing list