nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.75k stars 483 forks source link

Cant find component interpolation (<i18n> component) #2744

Closed MickL closed 9 months ago

MickL commented 9 months ago

Environment

- Operating System: Darwin
- Node Version:     v21.2.0
- Nuxt Version:     3.10.0
- CLI Version:      3.10.0
- Nitro Version:    2.8.1
- Package Manager:  bun@1.0.25
- Builder:          -
- User Config:      devtools, css, modules, image, ignore, build, i18n
- Runtime Modules:  @nuxtjs/i18n@8.0.0, @nuxt/image@1.3.0, nuxt-icon@0.6.8
- Build Modules:    -

Describe the bug

I am looking for the <i18n> component that is described in the vue-i18n docs but I just cant find it in the nuxt/i18n docs. Specifically I am looking for the slot syntax usage:

https://kazupon.github.io/vue-i18n/guide/interpolation.html#slots-syntax-usage

<i18n path="info" tag="p">
    <template v-slot:limit>
      <span>{{ changeLimit }}</span>
    </template>
    <template v-slot:action>
      <a :href="changeUrl">{{ $t('change') }}</a>
    </template>
  </i18n>

But I get the error:

[Vue warn]: Failed to resolve component: i18n If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

Additional context

No response

Logs

No response

BobbieGoede commented 9 months ago

Since v8 we're using vue-i18n v9.x, please refer to its docs you probably want to check out the section on breaking changes (specifically this section: Translation component).

MickL commented 9 months ago

Wow when googling "vue i18n" it shows up the 8.x docs and there is no info that there is a newer version including new website/docs.

Thanks for the quick response! <i18n-t> does the job :)