rakutentech/r10/2.1.1

NOTE: the latest version is 7.0.0

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/rakutentech/r10 exists but has no tag 2.1.1; Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 2.1.1 found (60 same-name repos checked); no cached copy. Use another version.

Details

R10.I18n

Internationalization stuff

t : Language -> Translations -> String

Translate some text

tmd : Language -> Translations -> List (Element msg)

Translate some text with markdown

replace : List ( String, String ) -> String -> String

Utility for variable replacement in translation.

raw : String
raw =
    "Hello my name is '{firstName}, {lastName}'"


result =
    raw
        |> R10.I18n.replace [ ( "{firstName}", "foo" ), ( "{lastName}", "bar" ) ]


-- result == "Hello my name is 'foo, bar'"