@hackage localize0.2.0.0
GNU Gettext-based messages localization library
Categories
License
BSD-3-Clause
Maintainer
portnov84@rambler.ru
Links
Versions
Installation
Dependencies (15)
- Glob >=0.7.14
- base >4 && <5
- binary >=0.7
- bytestring >=0.10 && <0.11
- containers >=0.5
- data-default >=0.7 Show all…
Dependents (3)
@hackage/acme-everything, @hackage/batchd-core, @hackage/batchd
localize README
This package is more or less fully functional translation framework, based on haskell-gettext package. The key features are:
- Convinient functions for translation.
- Full support of gettext features, such as message contexts and plural forms.
- It is possible to detect language to use by process locale. But it is not
necessary, you for example may want to use
Accept-LanguageHTTP header instead. - Easy integration with custom monadic stacks by implementing instance of
Localizedtype class. - There are two simple implementations of
Localizedtype class, for IO and StateT-based monad transformer. Being mostly examples, these implementations can be useful in relatively simple applications. - Utility functions to locate catalog files by specified rules. Example rules for locating catalog files under source directory and for locating them under usual Linux locations are provided.
- Integration with text-format-heavy package. It may be more convinient
than use of some other formatting libraries (
printf, for example), since it supports named variable placeholders, much easier for translators to understand.
Please refer to Haddock documentation and to examples in examples/ directory.