Talk:Internationalization of Haskell programs using gettext

From HaskellWiki
Revision as of 07:32, 16 February 2011 by Aufheben (talk | contribs) (Undo revision 38776 by Aufheben (Talk))
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

I think the gettext function __ should add decodeString from Codec.Binary.UTF8.String for many locales to be displayed correctly, such as zh_CN.

import Codec.Binary.UTF8.String (decodeString)

__ :: String -> String
__ = decodeString . unsafePerformIO . getText

See my post on "stackoverflow".