-
-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.0.0-beta.3 - Nuxt 3 RC13] $te
is not auto-imported in template - _ctx.$te is not a function
#1643
Comments
Thank you for your reproting!
The reason for the deprecation is that having that API would complicate the i18n implementation by programmatically checking for the presence of keys. As an alternative to checking for the presence of a key, vue-i18n by default outputs a warning if the key is not present. And also, vue-i18n provides an eslint plugin that can be used to statically check for the presence of a key. |
@kazupon Thanks for the info! So there is no way to programmatically check the existence of a key and e.g. render a component based on it (except with the legacy API)? |
@manniL const { te } = useI18n(); |
Good to know! But still, |
Hi! |
Version
@nuxtjs/i18n: 8.0.0-beta.3
nuxt:3.0.0-rc.13
Nuxt configuration
Please change to
[x]
if relevant for this issue:nuxt generate
)@nuxtjs/i18n configuration
Reproduction Link
https://stackblitz.com/edit/i18n-module-1643?file=app.vue,nuxt.config.ts,package.json
Steps to reproduce
$te
in templateWhat is Expected?
$te
working out of the boxWhat is actually happening?
See
_ctx.$te is not a function
as error.The text was updated successfully, but these errors were encountered: