[Haskell-cafe] Haskell and i18n (aka gettext) support

Gour gour at mail.inet.hr
Thu Sep 4 00:53:47 EDT 2008

Dear Haskellers,

Some time ago the question was asked on gtk2hs mailing list about how to
work with *.po files, i.e. how to make Haskell program i18n-aware. (see

The answer was that Gtk2hs does not have gettext support
(http://article.gmane.org/gmane.comp.lang.haskell.gtk2hs/593), but that
it is something which is needed
(http://article.gmane.org/gmane.comp.lang.haskell.gtk2hs/598) but it's
not clear how to do it.

As potential 'solution the 'i18n' package was mentioned
(http://hackage.haskell.org/cgi-bin/hackage-scripts/package/i18n) with
the remark that its API is not the most beautiful.

Moreover, by looking at i18n's *.cabal file one can see it is labelled
as 'experimental'.

Moreover, if one inspects GNU gettext manual one can see the list of
languages with the explanations how to make the program i18n-ready.

The list is, unfortunately, without Haskell:

    * C: C, C++, Objective C
    * sh: sh - Shell Script
    * bash: bash - Bourne-Again Shell Script
    * Python: Python
    * Common Lisp: GNU clisp - Common Lisp
    * clisp C: GNU clisp C sources
    * Emacs Lisp: Emacs Lisp
    * librep: librep
    * Scheme: GNU guile - Scheme
    * Smalltalk: GNU Smalltalk
    * Java: Java
    * C#: C#
    * gawk: GNU awk
    * Pascal: Pascal - Free Pascal Compiler
    * wxWidgets: wxWidgets library
    * YCP: YCP - YaST2 scripting language
    * Tcl: Tcl - Tk's scripting language
    * Perl: Perl
    * PHP: PHP Hypertext Preprocessor
    * Pike: Pike
    * GCC-source: GNU Compiler Collection sources 

Real World Haskell book is at the door and it will bring army of new
Haskell programmers to find out that Haskell misses one of the important
items in its "battery set". :-(

So, we think that i18n issue or proper gettext support should have a
stable and well documented implementation and has to be part of
"batteries included" or Haskell Platform

However, don't ask me 'how' :-D

We got some hints on the IRC yesterday, but considering it is important
issue for the whole Haskell community, we are bringing it here so that
smarter and more skillful (than ourselves) souls can discuss it.

I hope you are not seeing it as critique of the Haskell, but rather as
attempt to improve our beloved language with the feature necessary to be
included in the arsenal of every general programming language.



Gour  | Zagreb, Croatia  | GPG key: C6E7162D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080904/2edcede3/attachment.bin

More information about the Haskell-Cafe mailing list