Copyright | (c) 2011-2016 Eugene Grigoriev |
---|---|
License | BSD3 |
Maintainer | Philip Cunningham <hello@filib.io> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Internationalisation support for Haskell.
- type Context = Text
- type CtxMap = Map (Maybe Context) TranslationMap
- type I18n a = ReaderT (Locale, L10n, Maybe Context) Identity a
- type L10n = Map Locale (Map (Maybe Context) (Map Msgid [Msgstr]))
- newtype Locale = Locale Text
- data MsgDec = MsgDec (Maybe Context) Msgid [Msgstr]
- newtype Msgid = Msgid Text
- type Msgstr = Text
Type Declarations
type CtxMap = Map (Maybe Context) TranslationMap Source
Mapping from a contexts to translation mappings.
type I18n a = ReaderT (Locale, L10n, Maybe Context) Identity a Source
The Internationalization monad built using monad transformers.
Textual representation of a locale e.g. >>> Locale "en_GB" ...
Locale Text |
Untranslated string. >>> Msgid "hello there" ...
Msgid Text |