tis 2002-05-14 klockan 18.56 skrev anatoli: > Robert Ennals <[EMAIL PROTECTED]> wrote: > > Surely that problem only arises if one insists on encoding all the relevant > > information inside a string. > > This is pretty much the only option, because translators > and programmers are different people. Translators can deal with > simple text files with one message string per line and not > much else. You can't hire a translation firm and tell them > "translate this Haskell module for me". > > You can treat message strings as declarations in a specialised > language. This language can be typed, and you could theoretically > typecheck it against your Haskell program using specialised tools. > But translators need to see simple readable message strings.
I played around with this some more. You can see some files at http://www.dtek.chalmers.se/~d95mback/gettext/ if you are interested. The use of unsafePerformIO may be unsafe here, I really haven't got a clue. When in doubt, use i18n instead of __ :) Output examples: martin@lexie:~/gettext$ LANG=sv_SE ./Main Hej världen! 1 Jedi trained I have. martin@lexie:~/gettext$ LANG=en_US ./Main Hello, world! I have trained 1 Jedi. Regards, Martin _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell