kg-bot/laravel-localization-to-vue
Exports your Laravel localization files into JavaScript so Vue components and vue-i18n can reuse the same translations. It supports PHP and JSON lang files, generates a JS object or module, can watch for changes, and keeps backend and frontend strings in sync without duplicate translation work.
What it is: kg-bot/laravel-localization-to-vue is a build-time bridge that reads Laravel's PHP language files and emits JS/JSON translation artifacts consumable by Vue's i18n layer. It is not a runtime library — it adds an Artisan command, not a request-path dependency.
Architecture fit: Good fit for the common Laravel + Vue topology (Inertia monolith, Laravel API + separate SPA, or Laravel serving a Vite-built front end). It keeps lang/ as the single source of truth and makes the front end a generated consumer rather than a second, hand-maintained translation store. That eliminates a well-known class of drift bugs where PHP and JS locale files diverge.
Integration feasibility: High. Composer install, optional config publish, one Artisan invocation. The v2.4 change set is narrow and non-breaking: a Laravel 13.x compatibility PR plus automated StyleCI formatting. No API changes, no config schema changes, no deprecations.
Technical risk: Low-to-modererate, and mostly contained by the fact that it is a dev/build dependency — a failure shows up as a build error, not a production outage.
| pipes vs vue-i18n plural rules), placeholder syntax (:name vs {name}), and :attribute-style replacements. Any mismatch becomes a runtime translation bug that unit tests on the Laravel side will not catch.xiCO2k/laravel-vue-i18n solves the adjacent problem at runtime with a shared __() helper. If the team already uses it, this package may be redundant.Key questions to resolve before adopting:
lang/ path convention does it scan (lang/ root vs legacy resources/lang/), and does it handle package-published vendor namespaces?Stack fit: Best where Vue is the only presentation layer consuming translations. Poor fit for Blade-heavy apps with incidental Vue islands — the artifact churn outweighs the benefit. Neutral for Inertia, where it works but competes with runtime helpers that avoid a build step entirely.
Migration path: Treat this as an additive, reversible step.
require-dev dependency and pin the version; do not let it float.resources/js/lang/*.json, a runtime helper, or hardcoded strings. Diff the generated output against the current artifacts key-by-key before switching consumers.git diff --exit-code) to prove parity.Compatibility: The Laravel 13.x PR is the headline, but confirm the floor. A package that supports 13.x may have dropped 9.x/10.x — if the fleet is mixed-version, that forces a version matrix per app. StyleCI commits are formatting-only and carry zero integration risk, but they do indicate a bot-driven release cadence, so read the diff rather than the version number.
Sequencing: Land it behind the build pipeline, not in front of a feature. Ideal slot is a maintenance window alongside a Vite/CI config change, so a generation failure is diagnosed against a known-good baseline. Do not bundle it with a vue-i18n major upgrade — that conflates two sources of translation breakage.
Maintenance: Small surface area, but it is a dependency on someone else's release cadence tied to Laravel majors. Budget a review at each Laravel upgrade; this is exactly the class of package that quietly breaks two months after a framework bump.
Support: Community package, no vendor SLA. Acceptable for a build tool with a plain-JSON output. Unacceptable if the team cannot articulate the fallback — which here is trivial: write a 50-line Artisan command that flattens lang/ and json_encodes it. Confirm that fallback is genuinely viable before depending on the package.
Scaling: Scales linearly with locales × keys. Watch for two ceilings: (a) monolithic single-file output bloating the initial JS bundle — prefer per-locale chunks with lazy loading; (b) generation time in CI as locale count grows. Neither is a runtime scaling concern.
Failure modes:
Ramp-up: Low for engineers — one command, one config file, an afternoon including parity verification. The real onboarding cost is on the localization side: translators and reviewers must understand that lang/ is authoritative and generated artifacts are never hand-edited. Enforce that with a header comment in generated files or a lint rule, or the first hotfix will edit the JSON directly and recreate the drift problem the package was adopted to solve.
Verdict on v2.4: Non-breaking, forward-compatibility release. It improves the adoption case (active maintenance against current Laravel) without changing integration effort or operational risk. Worth taking if the package is already in the stack or under evaluation; not, on its own, a reason to adopt.
How can I help you explore Laravel packages today?