Search by

larajs / i18n

maingocthanhtan96

Generates a vue-i18n compatible include file from your Laravel translations.

2.2.0 2026-03-28 03:27 UTC

This package is auto-updated.

Last update: 2026-08-28 04:22:01 UTC


README

This package allows converting language files from .php to .json to support frontend.

Quick start

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;