i18n-node
i18n-node copied to clipboard
How to force the defaultLocale and prevent i118n-node to create new locales file?
Hi, this is my init configuration:
i18n.configure({
locales: ['en', 'it'],
defaultLocale: 'en',
directory: __dirname + '/locales'
});
This is how I use i18n-node module:
let translated = i18n.__({phrase: 'api_result_value', locale: input.language}, coinName, model.price, model.coin_to, exchangeString);
I would expect that when the user locale is different from 'it' or 'en' it would fall back to 'en' and use it instead of creating a new locales file. Or at least, create that new file but use the default translation.
What am I doing wrong?