aurelia/i18n

Null values don't use default language

Closed this issue · 2 comments

I'm submitting a bug report

When the value for a translation is null, aurelia-i18n uses the stringified version "null" in stead of the value in the fallback language.

I've used a couple of tools, one of which is webtranslateit. In all of the tools I've used, empty translations get set as null. It would be very nice if i18n then falls back to the fallbackLanguage (which is our master file, english.).

@RWOverdijk hi this is intentional by i18next. See the official options docs and search for returnNull. Setting this to false in your plugin configuration on the i18next object, should solve your issue.

Also note the returnEmptyString property, which comes in handy from time to time as well.

I'm gonna close this one for now, if you @RWOverdijk have any other objections we can reopen any time