Internationalization/Localization API Draft

I’m not 100% sure in which scenario it is not possible to change the elm/js-asset on the user’s computer. Maybe that is because I am just thinking “websites”, and there, when the user reloads (or the Elm application makes their browser reload), they will get a new compiled application with updated translations. Could you perhaps elaborate what your situation is?

What I really like about the current API is, that you have the following guarantees:

  • Every piece of text is available.
  • Every placeholder is filled correctly.
  • Every required pluralization form is available.

If we want hot swapable translations, we would need some form of decoding at runtime and unfortunately I don’t see a way how I can make this possible and still get these three properties (without causing runtime errors). But I might be missing something!