Display text copy in multiple languages.
Describe original text copy and available translations.
If translation is not found for given ISO Code
output defaults to copy
.
Language Codes according to ISO 639-1
This list is not complete.
print : Code -> Multilingual -> Html Basics.Never
Render Multilingual copy to given language code.
Html.p []
[ Multilingual.print Jp copy
|> Html.map (always NoOp)
]
Above example renders Multilingual copy
in Japanese.
decode : Json.Decode.Decoder Multilingual
Decode Json data to Multilingual type
Decode.decodeString decode """
{
"copy":"Prevedi me",
"translations": {
"en":"Translate me",
"fr":"Traduis-moi"
}
}
"""