localize: GNU Gettext-based messages localization library

[ bsd3, library, text ] [ Propose Tags ]

More or less fully functional translation framework, based on haskell-gettext and text-format-heavy packages.

[Skip to Readme]
Dependencies base (>4 && <5), binary (>=0.7), bytestring (==0.10.*), containers (>=0.5), data-default (>=0.7), directory (>=1.3), filepath (>=1.4), Glob (>=0.7.14), haskell-gettext (>=, mtl (>=2.2.1), setlocale (>=1.0), text (>=1.2), text-format-heavy (>=, time (>=1.4), transformers (>=0.3) [details]
License BSD-3-Clause
Author IlyaPortnov
Maintainer portnov84@rambler.ru
Category Text
Source repo head: git clone https://github.com/portnov/localize.git
Uploaded by IlyaPortnov at Sat Oct 21 07:25:57 UTC 2017
Distributions NixOS:
Downloads 215 total (9 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-10-21 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for localize-

[back to package description]

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-Language HTTP header instead.
  • Easy integration with custom monadic stacks by implementing instance of Localized type class.
  • There are two simple implementations of Localized type 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.