This package allows converting language files from .php
to .json
to support frontend.
Install
composer require --dev larajs/i18n:dev-main
Generate
php artisan larajs:i18n
Publish config
php artisan vendor:publish --tag=larajs-i18n
Frontend
import {createI18n} from "vue-i18n";
import LaraJSI18n from "./i18n.generated.json";
const i18n = createI18n({
messages: LaraJSI18n,
});
export default i18n;