xiCO2k / laravel-vue-i18n

Allows to connect your `Laravel` Framework translation files with `Vue`.
MIT License
619 stars 51 forks source link

Register Globally #28

Closed zdarin closed 2 years ago

zdarin commented 2 years ago

Hi,

Im would like to make this plugin globally but something wrong not working can you help ?? Im trying to set but blank page appears

import { trans } from 'laravel-vue-i18n'

...
.mixin({ components: { trans } })
...
xiCO2k commented 2 years ago

Hey @zdarin I dont think that is the right way to implement mixins, check here: https://vuejs.org/api/options-composition.html#mixins

also you have $t('string') available on the templates globally.

zdarin commented 2 years ago

thx