driebit/elm-ginger/2.0.0

NOTE: the latest version is 5.0.1

Ginger.Translation

Definitions

= EN
| NL
| ZH

Conversion

Get the translated String value.

Defaults to an empty String.

Get the translated String value.

The first argument is the fallback Language.

Attempt fallback if translated value is missing, defaults to an empty String.

fromList : List ( Language, String ) -> Translation

Construct a Translation from a list of Language and String value pairs

toIso639 : Language -> String

Convert a Language to an Iso639 String

Html

text : Language -> Translation -> Html msg

Translate and render as Html text

We try to unescape the escaped characters but if that fails we'll render the Translation as is.

Html elements will be filtered out and the text will be joined.

html : Language -> Translation -> List (Html msg)

Translate and render as Html markup

Decode