| ||||||
| ||||||
| Description | ||||||
This library extends the Distribution with internationalization support. It performs two functions:
Each PO file will be placed to the {datadir}/locale/{loc}/LC_MESSAGES/{domain}.mo where:
The module defines following .cabal fields:
The last two parameters are used to send configuration data to the code during its compilation. The most common usage example is: ...
prepareI18N = do
setLocale LC_ALL (Just "")
bindTextDomain __MESSAGE_CATALOG_DOMAIN__ (Just __MESSAGE_CATALOG_DIR__)
textDomain __MESSAGE_CATALOG_DOMAIN__
main = do
prepareI18N
...
...
NOTE: files, passed in the x-gettext-po-files are not automatically added to the source distribution, so they should be also added to the extra-source-files parameter, along with translation template file (usually message.pot) WARNING: sometimes, when only configuration targets changes, code will not recompile, thus you should execute cabal clean to cleanup the build and restart it again from the configuration. This is temporary bug, it will be fixed in next releases. | ||||||
| Synopsis | ||||||
| ||||||
| Documentation | ||||||
| ||||||
| ||||||
| ||||||
Default main function, same as defaultMainWithHooks $ installGetTextHooks simpleUserHooks | ||||||
| Produced by Haddock version 2.6.0 | ||||||