adbrosaci / vue-lang-router

Vue language routing with (optional) localized URLs.
MIT License
66 stars 8 forks source link

vue3: Language Switcher empty #30

Open calvinomiguel opened 1 year ago

calvinomiguel commented 1 year ago

I am triying to implement the language switcher. I copied 1:1 the implementation from the docs:

<language-switcher v-slot="{ links }">
    <router-link :to="link.url" v-for="link in links" :key="link.langIndex">
      <span>{{ link.langName }}</span>
    </router-link>
  </language-switcher>

However when running the app, this is what's being rendered:

<div class="router-language-switcher" data-v-a788fd35=""></div>

The language switch options aren't there at all.

This is what the console is throwing:

You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle. [vue-i18n.esm-bundler.js:39:16](http://localhost:5173/node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js)

Although I have this key in my two locale files, I am still getting this too. [intlify] Not found 'layout.footer.copyright' key in 'en' locale messages.

Thank you in advance for your help.