Download the PHP package iammarjamal/inertiatrans without Composer
On this page you can find all versions of the php package iammarjamal/inertiatrans. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download iammarjamal/inertiatrans
More information about iammarjamal/inertiatrans
Files in iammarjamal/inertiatrans
Package inertiatrans
Short Description simple translation sync between Laravel and any frontend framework.
License MIT
Homepage https://github.com/iammarjamal/inertiatrans
Informations about the package inertiatrans
Overview
InertiaTrans is a Laravel package that synchronizes your Laravel translation files with any JavaScript front-end framework. Continue to maintain your translations in lang/**
as usual, and InertiaTrans will convert them into a JavaScript-friendly format on each page load.
Requirements
- Laravel
- Node.js
🚀 Installation
-
Install via Composer:
- Publish and install the NPM dependencies:
📚 Usage
1. Add the Blade directive
In your main Blade layout (e.g. resources/views/app.blade.php
), include the @inertiaTrans
directive inside <head>
:
2. Use translations in your front-end
React Example
Vue Example
🔍 How It Works
-
Laravel translations
- You keep your translation files in
lang/**
as usual. - The
@inertiaTrans
directive gathers them and injects a single JavaScript object into your page.
- You keep your translation files in
-
Caching in Production
- In
APP_ENV=production
, translations are cached for performance. -
After updating any translation file, run:
to clear the cache and load the latest strings.
- In
✨ Credits
- Creator: iammarjamal
📄 License
This package is released under the MIT License. See the LICENSE file for details.
All versions of inertiatrans with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0