Problem with universe:i18n 2.0.0

I have a problem with updating “universe:i18n” to version 2.0.0.
I have functions that server side create the content of some files, and I use “createTranslator” to set on the SERVER the language they should have.
createTranslator was removed in version 2.0.0.
How can I replace it?

const t = i18n.createTranslator(‘’, lang);
var record = t(’);

Also I read that for Blaze it is deprecated.
Do you have any suggestions of an alternative package for blaze?

Thank you very much for your help.

Hi @fabioguaiani,

You can write your own createTranslator based on i18n.getTranslation. Check the createTranslator source code from v1. You can modify it or copy/paste it into your project, and it will work right away.

universe:i18n can still work with Blaze. You can check the example integration here.

There are more changes in version 2.0.0. Read this migration guide for more information.