Download the PHP package codecng/laravel-inertia-translations without Composer
On this page you can find all versions of the php package codecng/laravel-inertia-translations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codecng/laravel-inertia-translations
More information about codecng/laravel-inertia-translations
Files in codecng/laravel-inertia-translations
Package laravel-inertia-translations
Short Description Provides translations for an Inertia Based Project
License MIT
Homepage https://github.com/codecng/laravel-inertia-translations
Informations about the package laravel-inertia-translations
Laravel Inertia Translations
A zero-configuration Laravel package that automatically exports your Laravel translations for use with Inertia.js. Supports both React and Vue, with full TypeScript support!
Installation
That's it! No additional configuration needed.
Usage
Whenever you add or modify translations in your Laravel application, simply run:
This command will:
- Check if language files exist (if not, it will publish them automatically)
- Process all your translation files (both JSON and PHP)
- Generate JSON translation files in
resources/js/lang/
- Create appropriate utility files based on your stack (React/Vue + TypeScript)
What Gets Processed
- ✅ JSON files in
lang/
directory - ✅ PHP files in language subdirectories
- ✅ Automatically merges all translations by locale
Generated Files Structure
Framework Support
React
Vue
Inertia Setup
Make sure to include the current language in your Inertia shared props (in your HandleInertiaRequests middleware):
Type Support
When using TypeScript, you get full type support for your translation keys:
Benefits
- 🚀 Zero configuration required
- 🔄 Simple one-command updates
- 🛠 Works with both JSON and PHP translation files
- 💪 Full TypeScript support
- ⚡️ Supports both React and Vue
- 🔍 Automatic type generation for translation keys
Credits
- Christian Negron
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-inertia-translations with dependencies
spatie/laravel-package-tools Version ^1.16
laravel/framework Version ^11.0 || ^12.0