[Ocaml-i18n] Re: [Caml-list] Camomile-0.5.0
Yamagata Yoriyuki
yoriyuki at mbg.ocn.ne.jp
Sat Jun 12 07:55:21 PDT 2004
From: Richard Jones <rich at annexia.org>
Subject: Re: [Ocaml-i18n] Re: [Caml-list] Camomile-0.5.0
Date: Sat, 12 Jun 2004 09:51:16 +0100
> Well I don't care for the silly philosophical arguments about whether
> implicit state is bad or not. What matters is that I can do something
> to change the language before handling each request. Each Apache
> process handles hundreds of requests (not simultaneously, however),
> and so needs to change the language hundreds of times.
For functions in UTF8Byte and UTF8Unicode, you can change its locale
by either
1) setting LC_* enviromental variables by Locale.setlocale
2) passing locale as an optional argument, which overwrites locale
obtained from LC_* variables.
For other functions, you have to explicitly pass the locale. However,
you could use partial application, e.g.
let my_col = compare_col locale in
...
my_col s1 s2
...
Most functionality of Camomile is accessible from UTF8Byte and
UTF8Unicode.
--
Yamagata Yoriyuki
More information about the Ocaml-i18n
mailing list