Since I upgraded to Meteor 3 and universe:i18n@3.0.1
, runWithLocale()
does not work as expected (it worked fine on Meteor 2 with universe:i18n@1.32.6
).
It neither picks the right text for the locale nor does it apply any parameters to the text, e.g. {$username}
. It just returns the plain string for the default language, including the placeholders for any parameters.
Here’s how I call it:
const language = user?.language || 'en-US';
await runWithLocale(language, async () => {
...
}
Does anybody know what the correct syntax would be for Meteor 3? Or is this just a bug?
I need this to localize emails sent out to users, based on their language preferences.