I'm working on a plugin where it will be possible to have multiple instances on a page using different locales. I couldn't find a way to do it, but I'm proposing something like this:
var translate = new Counterpart();
translate.setLocale('en');
translate.registerTranslations('en', {foo: 'bar'});
translate('foo'); // bar
You can then set the locale per instance, instead of globally.
I'm working on a plugin where it will be possible to have multiple instances on a page using different locales. I couldn't find a way to do it, but I'm proposing something like this:
You can then set the locale per instance, instead of globally.