tomatophp/tomato-translations
Tomato Translations is a Laravel package for managing app translations from an admin interface. Browse, add, and edit language files and database-backed strings across locales without touching code, making multilingual Laravel apps simpler to maintain.
Architecture fit. The package occupies a narrow but legitimate slot in a Laravel codebase: it centralizes translation keys in the database, exposes a Filament/TomatoPHP admin surface for editing PHP/JSON lang files, and wraps a Google Translations API integration for machine-assisted generation. For a TPM, the value is that it separates three concerns that are usually conflated — storage (DB-backed keys), editing (admin UI for non-engineers), and generation (API-backed plus a CLI path-scoped command). That separation is the reason to look at it at all: you can adopt the editor without the auto-translation, or the CLI step without the UI.
The v1.2.6 addition — an Artisan command that translates a selected path rather than the whole application — is the architecturally significant piece. It converts the package from an admin convenience into a pipeline-capable component: translation becomes a scoped, repeatable, scriptable step aligned to how software is actually released (one module/domain per change) rather than a big-bang locale sweep. That property determines whether localization can be sequenced into sprints or must be gated as a standalone project.
Caveat on fit: the package assumes a TomatoPHP/Filament host application. Outside that ecosystem the integration surface (routes, panel registration, shared UI dependencies) becomes bespoke work and the value proposition degrades toward "a lang-file editor with an API key."
Integration feasibility. Mechanically low-friction: Composer install, package discovery, config publish, credentials in .env, optional migrations for the key store, optional Filament panel registration. No new infrastructure. Critically, there is no runtime dependency on the package for serving translations — it writes files the framework already reads, which keeps the blast radius small and the rollback story simple (revert lang/).
The genuine feasibility question is not "can we install it" but "can we trust the write semantics." The v1.2.6 release note describes the capability in one line and points to a single commit. It documents neither the command signature, whether "path" means directory/glob/namespace, merge-vs-overwrite behavior, dry-run support, idempotency on re-run, provider error handling, nor rate-limit/cost controls. Until those are answered by reading source or running a spike, feasibility is provisionally low-to-moderate: install is easy, safe adoption is unproven.
Technical risk. Ranked:
Key questions to resolve before any go decision:
--locale, --force, --dry-run, --path), exit codes.Stack fit. Strong inside the target envelope, weak outside it. Adopt when: Laravel, file-based lang/ translations, a Filament admin panel already present (or planned), non-engineers need to edit copy, and multiple locales change per sprint. Do not adopt as a general localization strategy off that stack — bridging routes, auth, and panel registration typically exceeds the tool's value, and a TMS or a thin custom editor is the better spend.
Migration path. Treat this as additive, not a replacement. Keep lang/ as the source of truth in VCS; let the package be a producer/editor in front of it. Sequence:
v1.2.6 on a branch; confirm Composer resolution against the app's Laravel/PHP constraints.lang/ files without loss or reordering.Compatibility. The 1.2.5 → 1.2.6 delta is reported as additive with no breaking change or migration step — low upgrade risk. The real compatibility checks are environmental: Laravel major version support, Filament version alignment, PHP version floor, and whether the command depends on a specific translation driver or only on the DB store. Validate in a scratch app matching production's Laravel/PHP pair before touching the real repo.
Sequencing (recommended).
resources/views, not app/).Ask: approve a timeboxed spike — one engineer, one sprint, one locale, one scoped path — with a go/no-go based on string quality, repeatability, and safety of write behavior.
Maintenance. Two maintenance surfaces: the package itself (unmaintained-by-default — plan to vendor/fork or pin hard) and the DB key store, which becomes a second source of truth alongside lang/. That duplication is the core operational cost: someone must own the reconciliation rule when the DB and files disagree, and the rollback story is only clean as long as files remain authoritative and in VCS.
Support. No vendor support, no adopter community, negligible adoption. Internal support means the adopting team reads the source. Budget for that explicitly — "free package" is not zero-cost here. Escalation path is "we fork it," which requires someone with Laravel package fluency.
Scaling. Fine at the single-app, few-locale scale this is designed for. It does not scale into translator collaboration, glossary enforcement, translation memory, per-locale QA sign-off, or auditable approval chains — that is TMS territory. Google API cost scales linearly with characters translated; without scoping discipline ("translate everything each run") cost and review burden both grow faster than locale count.
Failure modes.
lang/, producing translations that exist in the UI but never ship, or vice versa.Ramp-up. Low for engineers already in the Laravel/Filament ecosystem: install, publish, migrate, register panel — hours to a day, with the real time spent in the spike validating write semantics. Non-engineers get the admin UI with minimal training, but need a written policy on what they may edit and what requires review. The organization-level ramp-up is the governance piece: define who holds copy-editing authority, what the review gate is, and how machine-generated strings are labeled as drafts. That work outlasts the tool and should be treated as the actual deliverable of the pilot.
How can I help you explore Laravel packages today?