beyondcode/laravel-inline-translation
BeyondCode's Laravel Inline Translation lets you edit your app's translations directly in the browser—click text, translate inline, and save without leaving the page. It streamlines localization for Laravel projects and keeps translation files up to date.
Architecture fit. The package is a thin Laravel add-on with a deliberately small footprint: a service provider, a Blade directive for wrapping copy, a middleware that injects in-browser editing affordances into HTML responses on the way out, config for locale/access/environment gating, and a persistence path for edited strings. It does not touch the ORM, queue, auth, or event systems, and introduces no new runtime dependency. For a TPM this is the central fact: the blast radius of adoption or removal is narrow, and the code is small enough to read end-to-end in an afternoon — which makes it a useful reference implementation to price and scope an in-house build. The countervailing fact is architectural: it assumes a server-rendered, request/response Blade world. If the product is moving toward a JS front end, Inertia, or a headless/API-first architecture, the core mechanism — rewriting HTML responses on the way out — stops applying and the package delivers little regardless of its quality. The TPM's first leverage is using that boundary to kill or confirm the option early, before engineering time is spent.
Integration feasibility. Feasible only in a narrow band. Last release July 2018, archived, zero dependents, and it predates Laravel 6's container and route-signature changes, so on a modern Laravel 9/10/11 + PHP 8.x app it is not an install-and-go dependency. Three realistic paths a TPM should frame for stakeholders: (a) a legacy app still pinned to the Laravel 5.6–5.8 era where it installs roughly as documented; (b) a fork we own and patch; (c) a reimplementation of the pattern in-house. Because the surface area is small, (c) is frequently cheaper than (b) once review, test, and upgrade burden are priced in. Order-of-magnitude planning estimate: one to two days of compatibility spike, then a small bounded build regardless of path. That framing converts an open-ended "can we use this?" question into a decision with a known cost ceiling — the TPM's primary deliverable here.
Technical risk. The dominant risks are lifecycle and security surface, not engineering complexity.
translations table. That contradiction determines whether we are managing a second source of truth or just writing files — it must be resolved in the spike, because it changes the operational story we tell stakeholders.Key questions.
Stack fit. Good fit for a legacy, server-rendered Laravel monolith (5.6–5.8 era, PHP 7.1/7.2) with Blade views and an existing admin/auth surface. Poor fit for a modern Laravel app, a JS-heavy front end, a multi-tenant SaaS with strict content governance, or anything needing translator collaboration. The most common scoping error — and the one a TPM is best positioned to prevent — is treating this as a localization platform. It is a thin in-app editing mechanism. Scope the roadmap item to "internal copy editing without a deploy," not "multi-language support."
Migration path. Do not plan a "migration to this package." Plan a decision among three options, and put the decision itself on the roadmap:
lang/ file workflow. Correct when the underlying need is translation management rather than in-context editing.Compatibility. Verify explicitly during the spike, and attach go/no-go criteria: does it install and boot on the current framework; does the Blade directive register without colliding with an existing directive name (alias it if so); does the middleware behave under the app's actual middleware ordering; does the missing-key fallback resolve to the key or to the default locale (this materially shapes editor UX and should be confirmed, not assumed); and does it persist to files, DB, or both.
Sequencing. (1) Timeboxed compatibility spike on a branch, with a written go/no-go. (2) Security review of the middleware and access gating. (3) Decide fork vs. reimplement based on spike findings — capture the decision and rationale so it is not relitigated. (4) Seed the translation store from existing resources/lang/*.json so we are not retranslating from zero. (5) Enforce one-directional sync via an export artisan command and commit the output. (6) Stand up the editor behind auth plus an environment flag, staging only. (7) Full click-through per locale to wrap copy and capture translations. (8) Add CI guardrails before enabling anyone outside the core team.
Operating constraints to bake into the plan. Never enable in production; gate on environment/config and auth; remember config:cache freezes the enable flag, so gating must be deliberate across deploy steps and re-verified per environment. Place the package middleware last in its group. Accept that extension points are thin — customization means editing published files, not extending classes, which reinforces the vendored/forked-source framing and means "upstream will fix it" is never a valid plan.
Maintenance. The headline cost. Archived, zero dependents, no movement since July 2018, so there is no upstream to absorb PHP or Laravel upgrades; every framework version bump becomes an owned task. Budget it as internal code — named owner, small test suite, standing line item in upgrade planning — not as a Composer dependency someone else keeps current. If we cannot commit that owner, we should not ship it.
Support. No maintainer, no docs site; the README and the source are the documentation. Internal support falls on whoever forks or reimplements. Acceptable for a team comfortable in Laravel internals, uncomfortable for anyone else; onboard people around reading the service provider, migration, and middleware rather than around documentation that does not exist.
Scaling. The read path is a per-locale lookup and is unlikely to be a bottleneck at content-site volumes. The write path is human: editing is page-by-page and locale-by-locale, so throughput scales with editor click-through time, not infrastructure. Fine for a small marketing or content site with a handful of locales; unsuitable as the mechanism for a large translation backlog, where a batch/TMS workflow is the only thing that scales.
Failure modes. Plan for these explicitly rather than discovering them:
lang/ files once two people edit in different places.Ramp-up. Low for a Laravel-comfortable engineer: an afternoon to read the code, one to two days for the spike, and a small bounded build thereafter. Low-to-moderate for non-engineer editors, who need a short walkthrough of the inline affordance and the one-directional export rule. High for the organization if expectations are not reset — the recurring failure is stakeholders hearing "edit translations in the browser" and inferring a localization platform. The TPM's leverage is setting that expectation up front: this is a reference implementation and a legacy stopgap, the real need (non-developers correcting copy without a deploy) is worth serving, and the realistic paths are a ~1–2 week in-house build or a maintained TMS — both of which come with modern framework compatibility and a support story this package cannot provide.
How can I help you explore Laravel packages today?