linguijs / lingui-laravel
Artisan command to generate localized JSON files with all your translations.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
pkg:composer/linguijs/lingui-laravel
Requires
- php: ^8.2
- illuminate/console: ^11.0|^12.0
- illuminate/filesystem: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- laravel/pint: ^1.24
- mockery/mockery: ^1.6
- orchestra/testbench: ^10.1|^9.0
- phpunit/phpunit: ^10.4|^11.5
This package is auto-updated.
Last update: 2025-09-26 02:12:03 UTC
README
Artisan command to generate localized JSON files with all your translations.
Installation
To get started, install Lingui via the Composer package manager:
composer require linguijs/lingui
Next, install the Lingui Vite plugin to ensure that your translations are generated during Vite's build step and also whenever your files change while running the Vite's dev server.
First, install the plugin via your package manager:
npm i -D @linguijs/vite-plugin
Then, update your application's vite.config.js
file to watch for changes to your application's lang files:
import { lingui } from "@linguijs/vite-plugin"; export default defineConfig({ plugins: [ lingui(), // ... ], });
You can read about all of the plugin's configuration options in the documentation.
Generating Translation Files
The ``lingui:make-json` command can be used to generate JSON files containing all your translations grouped by locale:
php artisan lingui:make-json
The --locale
option may be used to generate translation for specific locale only:
php artisan lingui:make-json --locale=pt --locale=en
You can safely .gitignore
the public/lang
directory as he's completely re-generated on every build.
Frontend Usage
Please visit the Lingui repo.
Requirements
- PHP 8.2+
License
The MIT License (MIT). Please see License File for more information.