Closed XShep closed 1 year ago
Hi, It looks like it depends whether you're using composition api or options api in your code. Make sure you're using v9 of i18n.
If you're using Options api, instead of app.use(i18n)
, you need to call $ngVueProvider.use(i18n)
as described in the Plugin/Use/Directives docs
If you're using Composition API it looks like i18n provides a composable that you can use to use in your setup functions (or script setup), so there should be no need to config ngVue at all for it.
Much thanks, i didn't found your documentation before. I'll close issue after successful tests.
Having problem with syntax, but in your example it is the same.
Saying me, that the :
is unexpected in config of angular module
const ngVue = ngVue3.useNgVue();
const ngVuePlugins = ngVue3.useNgVuePlugins();
angular.module("vue.components", [ngVue, ngVuePlugins])
.config(($ngVueProvider: NgVueProvider) => {
$ngVueProvider.use(i18n);
});
Maybe that happens because i'm importing without import statement? Btw ngVue works like that
Are you using TypeScript? If not remove : NgVueProvider
. I should probably clarify that in the docs.
Yeah, thanks a lot for help! Now it works
Hello, i would like to connect the i18n translations to the ngVue. Tried a lot of examples, searching inside the main files. I saw that you did plugins functionality, but can you please explain how to use it, and connect for example i18n?