[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Demexp-dev] Re: Issue to use ocaml-gettext with lablgtk
From: |
David MENTRE |
Subject: |
[Demexp-dev] Re: Issue to use ocaml-gettext with lablgtk |
Date: |
Tue, 24 Jan 2006 22:19:23 +0100 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Hello,
"Sylvain Le Gall" <address@hidden> writes:
>> Yes, using LANG=C when calling my program solves the issue. But for my
>> autotests, I need to do that *from* the program. Do you see a way to set
>> the locale from OCaml, for a given part of the code?
>>
>
> Humm, there is a way, but it is C code and it is not really clean:
>
> /* Change language. */
> setenv ("LANGUAGE", "fr", 1);
>
> /* Make change known. */
> {
> extern int _nl_msg_cat_cntr;
> ++_nl_msg_cat_cntr;
> }
>
> (from the gettext manual:
> http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC155
> )
Well, you're right, it isn't very clean. :) As I have found a
work-around my issue (see me other email), I'll keep it that way and
keep this solution in the archive if I ever have another issue that
needs this kind of work-around.
> Well, the avantage of camomile is that you can produce full ocaml native
> application (almost without C binding). The only other advantage, is not
> really "external developper" visible: it is a little bit cleaner because
> you have better control of thread unsafe variable. But it is not an
> issue, both implementation should work well.
Thank you for the explanation. Anyway, as I'm using the .glade system,
I'm forced to use GettextStub.Native.
One issue solved. :) Thanks!
Best wishes,
d.
--
pub 1024D/A3AD7A2A 2004-10-03 David MENTRE <address@hidden>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A