New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.
50,286 66
Install
composer require erag/laravel-lang-sync-inertia
Latest Version:v2.4.0
PHP:>=8.1.0
Laravel:8 – 13
License:MIT
Last Updated:Aug 24, 2026
Links: GitHub  ·  Packagist
Maintainer: eramitgupta

Laravel Lang Sync Inertia

License Latest Stable Version Laravel Compatibility Total Downloads

About Laravel Lang Sync Inertia

Laravel Lang Sync Inertia is a lightweight package for sharing Laravel translation files with Inertia.js applications. It provides a simple way to make backend language files available inside Vue 3, React, and Svelte pages without manually passing translation props in every response.

Features

  • 🔄 Automatic translation sharing through Inertia.js shared props.
  • 📦 Load single or multiple Laravel language files with syncLangFiles().
  • 🗂️ Nested language directories via dot notation, e.g. syncLangFiles('admin.users') → __('admin.users.name').
  • 🧩 Dedicated Vue 3, React, and Svelte helpers from @erag/lang-sync-inertia.
  • 📝 Use clean frontend helpers like __(), trans(), transChoice(), and trans_choice().
  • ✨ Laravel-style placeholder replacement with :name values.
  • 🧱 Legacy {name} placeholder support for existing translation files.
  • 🔢 Pluralization support with Laravel-style exact and interval choices.
  • 🌐 Locale-aware loading from lang/{locale} using Laravel's current app locale.
  • 📤 Export PHP language files to frontend-ready JSON with php artisan erag:generate-lang.
  • ↩️ Direct string fallback when a translation key is not found.
  • 🛠️ Configurable language source and JSON output paths.
  • ✅ TypeScript-ready frontend helper package.

Documentation

Documentation for Laravel Lang Sync Inertia can be found at https://erag.in/laravel-lang-sync-inertia/.

Installation

Install the Laravel package using Composer:

composer require erag/laravel-lang-sync-inertia

Install the frontend helper package using npm:

npm install @erag/lang-sync-inertia

NPM package repository: https://github.com/eramitgupta/lang-sync-inertia

Contributing

Thank you for considering contributing to Laravel Lang Sync Inertia.

Support the Project ⭐

If you find Laravel Lang Sync Inertia useful, please consider giving it a star on GitHub. It helps the project grow and reach more developers!

License

Laravel Lang Sync Inertia is open-sourced software licensed under the MIT license.

Related Packages

outhebox/laravel-translations

Manage your Laravel translations with a beautiful UI. Add, edit, delete, import,...

124,884 821
alecscodes/inertia-i18n

Minimal i18n for Laravel Inertia — share PHP and JSON translations with t() and...

1 0
sematico/laravel-inertia-i18n

Bridge Laravel JSON translations with React apps built on Inertia.js

45 0
repositoriomaster/laravel-translations

Laravel Translations UI provides a simple way to manage your translations in you...

651 0
draskog/drasko-translations

Laravel Translations UI provides a simple way to manage your translations in you...

330 0

Version History

Version Released PHP Laravel License
v2.4.0 >=8.1.0 ^8.12|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v2.3.0 >=8.1.0 ^8.12|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v2.2.6 >=8.1.0 ^8.12|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v2.2.5 >=8.1.0 ^8.12|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v2.2.4 >=8.1.0 ^8.12|^9.0|^10.0|^11.0|^12.0|^13.0 MIT