Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pretty printing of values with localization
Synopsis
- data GrammarCase
- class LocalizedPrint a where
- localizedShow :: Language -> a -> Text
- localizedShowCased :: GrammarCase -> Language -> a -> Text
- localized :: MonadLocalized t m => a -> m (Dynamic t Text)
- defaultLocPrintDyn :: MonadLocalized t m => (Language -> a -> Text) -> a -> m (Dynamic t Text)
Documentation
data GrammarCase Source #
Grammar case to change form of word
Nominative | the “subject” case |
Accusative | the “direct object” case |
Genitive | corresponding to the possessive case or “of + (noun)” |
Dative | corresponding to “to + (noun)" or the indirect object |
Instrumental | denoting an instrument used in an action |
Prepositional | used with many common prepositions, such as “in”, “on” etc. |
Instances
class LocalizedPrint a where Source #
Printing human readable localized values.
Minimal implementation is either localizedShow
or localizedShowCased
Nothing
localizedShow :: Language -> a -> Text Source #
Convert value to localized string
localizedShowCased :: GrammarCase -> Language -> a -> Text Source #
Convert value to localized string using grammar case
localized :: MonadLocalized t m => a -> m (Dynamic t Text) Source #
Convert value to a dynamically changed string
Instances
LocalizedPrint Text Source # | |
Defined in Reflex.Localize.Class localizedShow :: Language -> Text -> Text Source # localizedShowCased :: GrammarCase -> Language -> Text -> Text Source # localized :: MonadLocalized t m => Text -> m (Dynamic t Text) Source # | |
(LocalizedPrint a, LocalizedPrint b) => LocalizedPrint (Either a b) Source # | |
Defined in Reflex.Localize.Class localizedShow :: Language -> Either a b -> Text Source # localizedShowCased :: GrammarCase -> Language -> Either a b -> Text Source # localized :: MonadLocalized t m => Either a b -> m (Dynamic t Text) Source # |
defaultLocPrintDyn :: MonadLocalized t m => (Language -> a -> Text) -> a -> m (Dynamic t Text) Source #
Default implementation