Closed mariusberget92 closed 1 year ago
Is it possible to access $t inside the persistent layout? I am trying to set a page title based on plural form of a model, needing $t('User|Users', 2) like this:
$t('User|Users', 2)
layout: (h, page) => { return h(VLayout, { pageTitle: $t('User|Users', 2) }, () => page); },
It throws a undefined error. I did kind of expect it though, just wondering if there's a way to access $t in there.
you have to use trans() method..
trans()
import { trans } from 'laravel-vue-i18n'
Is it possible to access $t inside the persistent layout? I am trying to set a page title based on plural form of a model, needing
$t('User|Users', 2)
like this:It throws a undefined error. I did kind of expect it though, just wondering if there's a way to access $t in there.