maximepinot/google-translate-command-bundle
Symfony bundle providing console commands to automatically translate translation files via the Google Translate API. Configure your API credentials and target locales, then run the command to generate translated message catalogs.
Architecture fit — poor as-is, workable as a pattern. The package is a Symfony bundle (maximepinot/google-translate-command-bundle), not a Laravel package. It ships a console command that walks Symfony translation files (typically translations/messages.<locale>.yaml|xlf) and fills missing keys by calling the Google Translate API. There is no service provider, no config publish tag, no Laravel-facing facade. In a Laravel codebase, its only reusable asset is the idea plus, at best, the translation-file parsing and API-call logic — which would need to be lifted into an artisan command or a queued job. Treat this as a reference implementation, not a dependency.
Integration feasibility — low direct, moderate with a wrapper. Direct composer require into a Laravel app brings in Symfony console/bundle conventions that collide with Laravel's container and command registration. A viable path is to install it in a small standalone CLI context or fork the translation logic into a first-party artisan command (translations:sync) that reads lang/<locale>/*.php or JSON and writes back. Budget a spike (1–2 days) to confirm the file-format assumptions and whether the Google client is swappable.
Technical risk — high, dominated by adoption and vendor signals. Zero stars, zero dependents, a score of 0, and no evidence of recent maintenance. That means: no security response, no PHP/Laravel version tracking, no guarantee the Google Translate v2 endpoint usage is current. Secondary risks: (1) the API is a paid, credentialed external dependency — key handling, quota, and per-character cost land on us; (2) machine translation of UI strings without a glossary degrades tone and breaks placeholder/pluralization syntax if the tool is naive about ICU or :attribute tokens; (3) an automated writer over translation files can silently overwrite human-reviewed strings. There is no test suite signal, so behavior on edge cases (nested keys, empty values, multi-line strings) must be assumed unverified.
Key questions for the maintainer/decision owner:
Recommendation: do not adopt as a runtime dependency. Use it as a design reference and build a thin in-house command, or evaluate a maintained alternative (e.g., a translation-management SaaS with a Laravel SDK).
Stack fit. Laravel-first: the deliverable should be an artisan command plus a queued job, not a Symfony bundle. Source strings live in lang/en/*.php or JSON; target files are generated. The Google Translate call sits behind an interface (TranslatorContract) so it is mockable and replaceable — this is the single most important design decision and the one thing worth borrowing from the package's structure.
Migration path.
translations:sync --locale=fr --dry-run. Default to dry-run and diff output; require an explicit --write. Add a CI check that fails if a machine-translated string is committed without the review marker..env in the repo), hard quota cap, and per-run character accounting logged.Compatibility. Pin PHP and Laravel versions explicitly if any code is reused. Because the package is unmaintained, assume no compatibility with current Laravel (11/12) and no PHP 8.3+ guarantees; the sandbox spike must confirm before any reuse.
Sequencing. Credentials and cost approval → sandbox spike → interface + command → dry-run/diff tooling → CI guardrails → human review workflow → expand locale coverage. Do not sequence translation-file writes before the review gate exists.
Maintenance. Effectively 100% ours. An unmaintained zero-adoption dependency is a liability, not a saving: we would own patching, PHP upgrades, and Google API changes regardless. Owning ~300 lines of first-party code is cheaper than owning a fork of someone else's.
Support. No community, no issue backlog activity, no SLA. Internal ownership must be assigned to a named engineer or team, with the command documented in the platform runbook. Escalation path is "fix it ourselves."
Scaling. Two axes. Volume: translation runs scale with key count × locales; batch the API calls, cache by source-string hash so unchanged strings are never re-billed, and move long runs to a queue. Organizational: as locales grow, ad-hoc commands stop working — you need a source-of-truth for translations and a review workflow, which argues for a TMS rather than a script long term.
Failure modes.
:name, {count}, ICU plurals) → runtime errors or broken UI in production. Mitigate: validate placeholder parity against the source locale as a post-step, and fail the run on mismatch.Ramp-up. Low technical ramp-up (a small command, familiar tooling), but non-trivial process ramp-up: someone must own the review workflow, glossary, and cost budget. Expect ~1 engineer-week to first safe production run including the spike, plus ongoing product/legal review time per locale. Recommend a 60-day checkpoint: if locale coverage or review throughput has not improved measurably, retire the tooling and move to a managed TMS.
How can I help you explore Laravel packages today?