demexp-dev
[Top][All Lists]
Advanced

[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 21:53:55 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Sylvain,

[ Could you keep demexp-dev in the Cc:? It allows archiving of emails
  for future people having same issue as me. ]

"Sylvain Le Gall" <address@hidden> writes:

>> For example, if at the end of a module I put:
>>   let _ = Printf.printf "1.0 = %3.3f\n" 1.0
>> 
>> I get as result when launching above program:
>>   1.0 = 1,000
>
> Humm, i think that a C printf call is used in the Printf module, which
> take into account that locale you have set using LANG.

Hmmm, I'm quite suprised that Printf is using C printf. But I checked in
3.08.2 source code and you are indeed right: Printf.scan_format is
calling external format_float which has a call to C sprintf.

> Maybe, you should try something like "env LC_NUMERIC=C myprogram" which
> should give you the expected result (if C is bind to english, otherwise
> try LC_NUMERIC=en_US).

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?

>> > However, I'm also using "_s" functions. I suppose I have to define a
>> > second module for those translations. How am I supposed to use both
>> > modules? What should be the init sequence? (BTW, I would be nice to
>> > put a word on this in your documentation)
>> 
>> Ok, it seems that call to "f_" and the like are working with
>> GettextStub.Native, so I don't need to use simultaneously
>> GettextStub.Native and GettextCamomile.Map.
>> 
>> Is it an issue to use GettextStub.Native?
>> 
>
> What are _s functions ?

Sorry, I was confused, I meant s_, f_ & Co. functions.

> Why should it be an issue to use GettextStub.Native ?

I don't know. :) I suppose that, as you have made gettext through
Camomile available, there are some advantages to use it over the stub
version?

Best wishes,
d.
-- 
 address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]