[Haskell-cafe] haskell i18n best practices
pocinho at gmail.com
Fri Sep 30 00:54:35 CEST 2011
I've been trying to figure a nice method to provide localisation. An
application is deployed using a conventional installer. The end-user
is not required to have the Haskell runtimes, compiler or platform.
The application should bundle ready to use translation data. What I am
after is simple; an intuitive way that an interested translator, with
little knowledge of Haskell, can look at and create valid translation
This is what I've been looking at lately. The first thing I noticed
was the GNU gettext implementation for Haskell. The wiki page  has
a nice explanation by Aufheben. The hgettext package is found here
I don't know if this is a bad habit, but I had already separated the
dialogue text in the code with variables holding the respective
strings. At this time, I thought there could be some other way than
gettext. Then I figured how to import localisation data, that the
program loads, from external files. The data type is basically a tuple
with variable-names associated with strings. This is bit like the
file-embed package .
Still uncomfortable with i18n, I learned about the article "I18N in
Haskell" in yesod blog . I'd like to hear more about it.
What is considered the best practice for localisation?
More information about the Haskell-Cafe