-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
this.$t is undefined in Quasar 2 #9010
Comments
I'm guessing you're trying to use you have to import useI18n first : import { useI18n } from "vue-i18n"; then you can access $t (without const { t: $t } = useI18n(); |
Always read the documentation of the packages that you are using. In this case, the docs for vue-i18n should state how it can be used with Composition API. |
@rstoenescu Still, should update the Quasar docs on how to use it, since this is where people check first. And it doesn't mention the composable API, but it's mentioned on most other places. |
@tmikaeld There you go. Improved docs. Will be available in next docs deployment. |
Currently I have Quasar 2 installed in a project and when I try to access this.$t for example for the i18n, I get an error saying that it is undefined.
UPDATE: I have seen what the error is, I am trying to access this.$t, currently I see that this is not supported, what would be your alternative? and if I want to use for example this.$q from Quasar I should do: import { useQuasar } from 'quasar' but... what would be the equivalent of $t for i18n?
The text was updated successfully, but these errors were encountered: