Open fisx opened 7 years ago
Note that there is Intl
, which wraps a react library, but (a) it has several problems and I would like to replace it with something nicer, and (b) this issue is more about preparing the library core to support the kind of effects that handling multiple languages requires.
Keeping track of the language selected by the user is either awkward (make all functions everywhere take an extra argument) or unelegant (use a global MVar, which requires
unsafePerformIO
).A better design may be possible if we have a class constraint
HasI18nKey
that can be required by all places that currently requireReactElementM
, and possibly others (e.g. when generating form errors or printing errors from the backend).This issue needs more details.