Violaine & Sylvain Website

Aller au contenu | Aller au menu | Aller à la recherche

Project ocaml-gettext

Goals

Ocaml-gettext should provide a support for internationalization of Ocaml program.

Constraints :

  • provides a pure Ocaml implementation,

  • the API should be as close as possible to GNU gettext,

  • provides a way to automatically extract translatable strings from Ocaml source code.

Description

Internationalization of a program means that the program have the possibility to handle different language. Handling different language means that it can output string which depends on the language of the user, who will read it. Typically, if a program output "bonjour" for a french user, and "hello" for an english user, this program is internationalized.

It is possible to make things very simple ( at least i think so ), for internationalizing a program. GNU gettext seems a very good solution. You just need to use a special function to translate strings, that need to be translated and they are treated automatically. After having include this function ( in the case of ocaml-gettext, functions are "s_", "f_","sn_" and "fn_".

For now, ocaml-gettext provides enough service to build a basic internationalized program. It comes with :

  • a pure Ocaml implementation, based on Camomile,

  • a binding to GNU gettext library,

  • ocaml-gettext a tool to extract strings from Ocaml source.

News

Version 0.2.0

This is the first official public release.