[Ocaml-i18n] Re: [Caml-list] Camomile-0.5.0

Yamagata Yoriyuki yoriyuki at mbg.ocn.ne.jp
Fri Jun 11 16:27:16 PDT 2004


From: Richard Jones <rich at annexia.org>
Subject: Re: [Ocaml-i18n] Re: [Caml-list] Camomile-0.5.0
Date: Fri, 11 Jun 2004 19:48:48 +0100

> Possibly dumb question:
> 
> In server applications which I've written, it's often important to
> change the language while running.  For example, on
> http://www.postmaster.co.uk/ which is a multi-lingual UTF-8 mail
> service, when a request arrives at the webserver and is handled by
> mod_perl[1], we know from the cookie who the logged-in user is, and
> what their language preference is.  And we set the LANG variable from
> this information.  As a result, gettext results, collation, templates,
> etc. all change.

Functions in UTF8Byte and UTF8Unicode modules (Unfortunately, these
modules are currently undocumented.  Meanwhile, see section 2.3 in
README.txt http://camomile.sourceforge.net/README.txt) respect LANG
variable.  For other functions, you have to explicitly pass the locale
as an argument.

There is a tension between purely functional style and the style using
implicit states.  I am not sure about which style is better.

I am interested to hear the other ocaml-i18n participants' opinion.
--
Yamagata Yoriyuki




More information about the Ocaml-i18n mailing list