-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Specifing a specific locale in $t #1184
Comments
you can use thanks |
What I am asking is that I have the app with locale = a |
This is not the place to ask questions, Here is the bug & issue-reporting place. Thanks |
For anyone else coming accross this question: Using the old package kazupon/vue-i18n the following should be possible:
When using the successor-package intlify/vue-i18n-next , the answer depends on if you are using Vue I18n's Legacy API or the newer Composition API: Using Legacy API as described in the normal setup guide the usages of the This means you can still use the following call to translate a key to a specific locale (e.g. 'fr'):
Example:
Using the Composition API by calling
So the easiest solution would be e.g.:
|
I would like to ask if there is a way to specify the language used in $t function regardless of the current locale/language.
In other words, I want to show messages in language x without hard-coding the messages.
For example,
$t('some.message', { locale: 'en' })
would result in the English translation regardless of the current locale.The text was updated successfully, but these errors were encountered: