localize: GNU Gettext-based messages localization library

[ bsd3, library, text ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.2.0.0, 0.2.0.1
Dependencies base (>4 && <5), binary (>=0.7), bytestring (>=0.10 && <0.11), 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 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 2022-02-01T19:15:53Z
Distributions
Reverse Dependencies 2 direct, 2 indirect [details]
Downloads 1011 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-02-01 [all 1 reports]

Readme for localize-0.2.0.1

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