Hey, thanks for a great library!
Currently I'm in the process of converting our ancient, manual i18n logic to something more streamlined, and I think this library seems like a great fit!
I was wondering though, if it would be possible to set a default locale that would be fallen back to in case formatMessage fails when a local key is missing. In our project, we sometimes make releases before all our translators have translated each new key. In this case we want to fall back to English.
For example, let's say we add a new message, and neglect to translate it to German. If we call formatMessage for that key in DE locale, we don't have a German translation. In this case, I'd like to fall back to English. Only if English key wouldn't exist either, should we fall back to rendering the key itself. Is this possible? I didn't find support for this behavior in your documentation.
Hey, thanks for a great library!
Currently I'm in the process of converting our ancient, manual i18n logic to something more streamlined, and I think this library seems like a great fit!
I was wondering though, if it would be possible to set a default locale that would be fallen back to in case
formatMessagefails when a local key is missing. In our project, we sometimes make releases before all our translators have translated each new key. In this case we want to fall back to English.For example, let's say we add a new message, and neglect to translate it to German. If we call
formatMessagefor that key in DE locale, we don't have a German translation. In this case, I'd like to fall back to English. Only if English key wouldn't exist either, should we fall back to rendering the key itself. Is this possible? I didn't find support for this behavior in your documentation.