erag/laravel-lang-sync-inertia
Syncs Laravel localization files with Inertia.js so frontend and backend share one translation source. Expose PHP lang strings as Inertia props, keep Vue/React text aligned with backend locales, and avoid duplicating translation management across your stack.
lang/*.php strings to Vue/React/Svelte. This is genuinely a one-to-two-day in-house build (a middleware or Inertia shared prop plus a Blade/JSON injection). The decision is not "can we build it" but "is this recurring plumbing worth owning forever?" For small teams, buying is defensible; for platform teams with existing i18n infrastructure, it is not.lang files as the canonical store and treat the frontend as a consumer. That forecloses (or at least complicates) frontend-owned translation tooling such as i18next namespaces or vue-i18n message compilation, and it has downstream implications for how translators and localization vendors interact with the repo.Consider it when most of the following hold:
lang files.Look elsewhere when:
For executives (30 seconds): We have a recurring, low-glamour problem: every time we add text to the product, someone has to manually copy translations into the frontend, and things drift. This package automates that handoff for Laravel + Inertia applications. It is MIT-licensed and costs nothing. The strategic value is speed: it removes a coordination step between backend and frontend work, which means localized features ship in one cycle instead of two, and we can localize incrementally rather than as a single large project. The tradeoff is that it is a small, early-stage open-source project — low adoption, effectively one maintainer. My recommendation is to adopt it for internal and client-facing apps where we can pin a version, and to treat it as replaceable plumbing rather than load-bearing infrastructure.
For engineering: This solves the translation-sharing seam in Inertia apps — it syncs Laravel lang files to Vue/React/Svelte so frontend components read the same strings the backend validates and emails with. What we get is a single source of truth and no manual export step. What we give up is some control: we inherit a young dependency with 66 stars and no downstream dependents, so we should vendor it or pin the version, review the source before merging (it is small enough to audit in an hour), and confirm the injection strategy does not bloat our Inertia response payloads. If the audit turns up concerns, the fallback is a shared-prop middleware we write ourselves — roughly a day of work — so the downside is bounded. Treat this as a reversible decision, not an architectural commitment.
How can I help you explore Laravel packages today?