phiil/googlesheets-translation-bundle
Sync Laravel translations with Google Sheets: edit language strings in a shared spreadsheet, then import them into your app's translation files. This bundle streamlines collaborative localization, keeping PHP lang files and spreadsheet content in step without manual copy-paste.
composer require philipp-riddle/symfony-google-sheets-translation-bundle, then check config/bundles.php / vendor/philipp-riddle/.../Resources/config for the service wiring and exact config keys — the README is the fastest first read, followed by the command class itself (that's where the real behaviour lives, especially after 5.3.0).client_email. Point the bundle at the key via env (GOOGLE_APPLICATION_CREDENTIALS or the bundle's credential option) — never commit it.translations/messages.<locale>.yaml files in git.lang/<locale>/*.php|json convention differs, so plan on a thin mapping layer.git diff — that catches "someone edited YAML directly" and "translator updated the sheet but nobody synced".app/Console/Kernel.php / routes/console.php, followed by a cache clear (php artisan cache:clear / php bin/console cache:clear) so the new catalogue is picked up.flock (or Laravel's Cache::lock) if cron can overlap; concurrent writers to the same files are the one way to get corrupted output.translation:update, syncing thousands of strings takes well under a second. That means you can stop batching — run per-locale, run in every CI pipeline, run on a webhook — without the old "this takes minutes" tax. Just remember the Google API call is now the only meaningful latency.translation:update, so formatting, key ordering, header comments, and how existing keys are merged or pruned may differ from files generated by 5.2.x. Do one upgrade sync on a branch and eyeball the diff before letting CI commit it — an ordering change alone can produce a 5,000-line noise PR.translation:update (--force, --dump-messages, --prefix, sort behaviour) either no longer applies or is now the bundle's own option. Re-read --help after upgrading rather than assuming your CI invocation still does what it did.1.0 becomes 1, TRUE becomes a boolean, 2024-01-01 may arrive as a serial number, and leading zeros on codes disappear. Quote cells in the sheet (prefix with ') or format columns as plain text for anything that isn't prose.foo.bar.baz) usually requires either dotted keys in the sheet or explicit nesting support; don't assume foo.bar in column A produces a nested array. Check a small sample first, then standardise the key column.| plural separators and {count} placeholders survive only if the writer preserves them. Test with a pluralised string and a string containing a colon before trusting the pipeline.403 when the spreadsheet isn't shared with the service account, 400 for a mismatched range or a tab name containing spaces/apostrophes. Log the raw API error once during setup; it saves an hour of guessing.translations/ (or your Laravel lang/) and to the directory itself if files are created. On failure mid-write, verify the writer is atomic (temp file + rename) — if not, keep generated files in git so recovery is a git checkout away.vendor/. If you need XLIFF, PHP arrays, or a different directory layout, subclassing/replacing the writer (rather than post-processing with sed) is the supported path — and post-5.3.0 that writer is now a first-class, self-contained component, which makes it a much friendlier thing to swap.How can I help you explore Laravel packages today?