[Ocaml-i18n] proposal: message catalogue system

Benjamin Geer ben at socialtools.net
Wed Dec 3 03:13:03 PST 2003


Another problem with gettext, which I forgot to mention in my last 
message, is that as far as I can tell, there's no way to use it in a web 
application, because it can only extract messages from C source code. 
(And maybe Caml if someone writes a tool to do that.)

I'm writing a web application in which the pages are generated from 
templates (using CamlTemplate).  I want to write templates that look 
like this:

<html>
<body>
<p>${msg("please_log_in"})

<form>
   ${msg("username")} <input type="text name="username">
   ${msg("password")} <input type="text name="password">
</form>
</body>
</html>

It seems that in order to use gettext, I would need a tool that 
extracted messages from templates and generated .po files.  I really 
don't want to write such a tool; it would be much easier to write the 
system I'm proposing.

Ben




More information about the Ocaml-i18n mailing list