I noticed issue #28 - I was wondering if this is possible to register anything globally though.
So instead of having to import trans each time (with import { trans } from "laravel-vue-i18n"), just use trans or $t or whatever immediately within the script tags like the following:
<script setup>
const someTranslation = $t('global.something'); // like in <template>
// or
const someTranslation = trans('global.something');
</script>
Hi,
I noticed issue #28 - I was wondering if this is possible to register anything globally though. So instead of having to import
trans
each time (withimport { trans } from "laravel-vue-i18n"
), just usetrans
or$t
or whatever immediately within the script tags like the following: