Skip to content

Adding a Language module

Descriptin

To add custom function based on the language, we want to add a language module:

module I18n.Language

type Language
  = DE_DE
  | EN_US

currentLanguage  : Language
currentLanguage =
   EN_US -- will be set when generated

This could be used like this:

case I18n.Language.currentLanguage of
  DE_DE -> text "HELLO"
  EN_US -> text "WORLD"