katjam / local-elm

Translation support for programming in Elm
0 stars 0 forks source link

Investigate some potentially related projects #1

Open katjam opened 1 year ago

katjam commented 1 year ago
marc136 commented 11 months ago

If we want to use project-fluent translations in the compiler, I did not find a nice library to use .ftl translations files directly in Haskell.
But we could follow a similar approach as elm-fluent to generate Haskell code from the translation files.

Or maybe someone smart can come up with a library, that maybe works similar to this gettext example where the translations are loaded at runtime from translation files.
This would be strange at first, because one compelling thing about Elm is that it is a single binary. But maybe it won't be so bad, if the additional translation files are only download when requested by the user and stored in $ELM_HOME.

Or all translations could be baked into the compiler, and we need a mechanism to allow switching the output locale (e.g. ENV var or a command line argument).

Before I derail this thread too much, I'll add more about this in #2.