Localization of Elm app

Here’s another interesting solution I’ve seen to the “bucket brigade” problem (having to pass the current language to all view functions in your app)
https://package.elm-lang.org/packages/arowM/elm-html-with-context/latest/
It replaces the regular Html type with a type that’s actually a function. Then at the top level of your app you resolve it with the selected language. This way you do it all in Elm, without complicating your build step.

What do you think? Anyone tried it?

3 Likes