- How do I install tomatophp/tomato-translations-module in a Laravel application?
- Install it with Composer using composer require tomatophp/tomato-translations-module, then register the module and its service provider following TomatoPHP module conventions and publish any config or migration assets. Because the package is part of the TomatoPHP ecosystem, install it on a non-production branch first and confirm your current TomatoPHP admin version is compatible. Check the repository README for the exact registration and publish commands, since the layout follows TomatoPHP module patterns rather than a generic Laravel package.
- Does this package require TomatoPHP or Filament, or can it run standalone?
- It is built as a TomatoPHP module with a Filament UI, so it is designed to run inside a TomatoPHP admin panel and expects Filament to be installed. Running it standalone in a plain Laravel app is not the documented path, and you would need to verify the underlying dependencies in composer.json and be ready to debug provider and panel registration issues. If you only need to manage translation keys in code, a general-purpose i18n tool or an external TMS is a better fit.
- Which Laravel and PHP versions are supported by this translations module?
- Version constraints are defined in the package's composer.json, so read that file and the README instead of assuming support for the newest Laravel release. Confirm your PHP and Laravel versions against those constraints, and check that the TomatoPHP admin packages you already use support the same Laravel major. Given the v1.0.x status, pinning the package version in composer.json is advisable.
- How does the JSON scanning for modules in v1.0.1 work?
- Version 1.0.1 added JSON scanning for modules, letting the package discover translation keys stored in per-module JSON files rather than only in database records. The feature targets modular Laravel applications where each module ships its own JSON translation file. Validate it against your real module structure and locale file layout before depending on the output, since behavior on unusual layouts is not extensively documented.
- Does the module only read translation files, or can it write and modify them?
- The module manages translation records through its Filament UI, and the JSON scanning feature is primarily a discovery mechanism for finding keys in module files. Whether any workflow writes changes back into JSON files is not clearly documented in the release notes, so back up translation assets and test on a staging copy before enabling anything that could modify files. Treat scanned output as input for review rather than an automatic rewrite of your locale files.
- How do I configure scan paths for modules, vendor packages, and application code?
- Scan paths are set through the module's configuration, and you point them at the directories where your modules, vendor packages, and application code store JSON translation files. Start with a narrow set of paths, run a discovery pass, and compare the discovered keys against your existing translation files. Pointing scans at an entire vendor directory is likely to be I/O heavy and will surface keys you do not actually want to manage.
- How does the package handle duplicate keys, malformed JSON, and missing module directories?
- These are real edge cases for any file scanner, and the release notes do not document specific handling for duplicates, invalid JSON, or absent directories. Build a fixture set that deliberately includes malformed JSON, a duplicated key, and a missing directory, then observe how the scan reports each failure. If failures are silent, add your own validation step or run scans in CI where problems are visible.
- Is there a dry-run or preview mode for scan results before keys are saved?
- A preview or dry-run mode is not described in the release notes, so assume the scan reports results directly rather than offering a staged approval step. Run it in a staging environment with a copy of production translation assets to see exactly what it surfaces before anything touches production. If you need deterministic output, capture scan results in CI logs and diff them between runs.
- How does the Google Translations API integration work, and does it send my strings externally?
- The package integrates with the Google Translations API to help fill in missing translation values, which means submitted strings are sent to Google's service and are subject to its terms, quotas, and billing. Review which keys you send, never push secrets or personal data through the API, and store credentials securely rather than committing them to the repository. If external calls are not acceptable, use the module purely as a key manager and translate manually.
- Is it production ready for large modular codebases, and what are the alternatives?
- It is a low-to-moderate risk tool: a patch-level feature addition with no indicated breaking changes, but with ecosystem coupling, single-maintainer release activity, and unproven behavior across very large module trees. Pin the version, keep a rollback path to your previous translation tooling, and validate performance against your largest expected module set before rolling it out broadly. If you need a standalone i18n workflow or already use an external TMS, treat this as an optional admin convenience rather than a replacement.