The localize package

[ Tags: bsd3, library, text ] [ Propose Tags ]

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


[Skip to Readme]

Properties

Versions 0.2.0.0
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 (>=0.1.1.0), mtl (>=2.2.1), setlocale (>=1.0), text (>=1.2), text-format-heavy (>=0.1.4.0), time (>=1.4), transformers (>=0.3) [details]
License BSD3
Author IlyaPortnov
Maintainer portnov84@rambler.ru
Category Text
Source repository head: git clone https://github.com/portnov/localize.git
Uploaded Sat Oct 21 07:25:57 UTC 2017 by IlyaPortnov
Distributions NixOS:0.2.0.0
Downloads 173 total (72 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

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for localize-0.2.0.0

[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.