Vuetify: 1.1.1
Vue: 2.5.16
Browsers: Chrome 67.0.3396.99
OS: Windows 10
{
en: {
$vuetify: {
dataIterator: {
rowsPerPageText: "Items per page:"
}
},
other: {
test: "the test"
}
}
}
{{ $vuetify.t('other.test') }} must return the translation
{{ $vuetify.t('other.test') }} return the key
The documentation is wrong, keys must be prefixed with $vuetify
{{ $vuetify.t('$vuetify.other.test') }}
This is so we can dynamically change the locale with prop defaults. $vuetify.t
isn't really intended to be used externally, if you already have vue-i18n installed you should use its $t()
instead.
https://github.com/vuetifyjs/vuetify/pull/4051/commits/c6e17bb1f5ad73e5a62b0a3df1d07796bb69d862
I just ran into this documentation issue too...what's the reason for wontfix
@KaelWD ?
the documentation still have the issue and killing developers time!
docs have been updated for next release.
https://github.com/vuetifyjs/vuetify/commit/97d74802282f846f697a32a09af5fc854d182490
Most helpful comment
The documentation is wrong, keys must be prefixed with
$vuetify
{{ $vuetify.t('$vuetify.other.test') }}
This is so we can dynamically change the locale with prop defaults.
$vuetify.t
isn't really intended to be used externally, if you already have vue-i18n installed you should use its$t()
instead.https://github.com/vuetifyjs/vuetify/pull/4051/commits/c6e17bb1f5ad73e5a62b0a3df1d07796bb69d862