cyberwolfstudio/lingua
Lingua is a Laravel package for managing translations in a database. It scans your project for translation keys, provides an editable UI for adding and updating strings, and caches translations for fast runtime performance. Simplify multilingual app localization without hand-editing language files.
lang/ directory remain the canonical store for all copy and pushes it into the frontend asset pipeline. This decides a recurring architectural question — do JS frontends read translations from an API, or from a build artifact? — in favor of the build artifact, eliminating a runtime translations endpoint and the cache/versioning work that comes with it./api/translations round trip — fewer requests on first paint, translations available before hydration, and locale bundles that can be cached and fingerprinted alongside other assets.Adopt when:
lang/ files are already the source of truth, and a JS frontend (Vue, React, Inertia) that needs the same strings — the alternative is duplicating translations, which decays immediately.Look elsewhere when:
laravel-vue-i18n) or own the exporter internally.If adopted, de-risk it: wrap the generated output behind your own i18n module so the source can be swapped without touching component code, pin the version, and add a CI check that the generated file is current.
For executives: This is a small, low-cost piece of plumbing that lets our Laravel backend and our JavaScript frontend share one set of translations instead of maintaining two. It removes a network request per page load, keeps copy consistent across server-rendered and interactive pages, and costs roughly a day of engineering to integrate. It is MIT-licensed with a narrow surface area, so the switching cost is low — the generated output is plain JSON and can be produced another way if we ever need to. The honest caveat: the project is young (26 GitHub stars, no dependents), so we should treat it as a convenience we can replace, not a foundation.
For engineering: Add the package, publish the config, and generate translations as part of the asset build, with regeneration in the dev watcher. The frontend consumes the emitted JSON through the standard i18n library. Because there is no runtime API, caching and cache-busting are inherited from the asset pipeline. Two guardrails: (1) wrap the generated files in a thin internal adapter so the dependency is replaceable; (2) add a CI assertion that generated translations are in sync with lang/ so we never ship stale copy.
Decision requested: Approve adoption as a reversible, tactical dependency for the current frontend localization work, with a review trigger if the frontend moves to runtime-editable translations or scales past a handful of locales.
How can I help you explore Laravel packages today?