i18n-0.4.0.0: Internationalization for Haskell

Copyright(c) 2011-2016 Eugene Grigoriev
LicenseBSD3
MaintainerPhilip Cunningham <hello@filib.io>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Text.I18n.Types

Contents

Description

Internationalisation support for Haskell.

Synopsis

Type Declarations

type Context = Text Source

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.

type L10n = Map Locale (Map (Maybe Context) (Map Msgid [Msgstr])) Source

The Localization structure.

newtype Locale Source

Textual representation of a locale e.g. >>> Locale "en_GB" ...

Constructors

Locale Text 

Instances

data MsgDec Source

Message delcaration.

Constructors

MsgDec (Maybe Context) Msgid [Msgstr] 

newtype Msgid Source

Untranslated string. >>> Msgid "hello there" ...

Constructors

Msgid Text 

Instances

type Msgstr = Text Source

Translated string.