- Can I use this package to manage translations in Statamic 3.x or Laravel 11?
- The package officially supports Statamic 6+ and Laravel 12+. For Statamic 3.x or Laravel 11, you’d need to manually adjust dependencies (e.g., pinning PHPUnit) or upgrade your stack. Test thoroughly in staging if attempting compatibility tweaks.
- How do I grant users permission to edit translations via the Control Panel?
- Assign the roles `access translation-manager utility`, `edit translation manager`, and `sync translation manager` to the desired user groups in Statamic’s permissions system. These are required for the package’s CP utility to function.
- Does this package support JSON or YAML language files instead of PHP?
- No, the package is explicitly designed for PHP-based language files (`lang/{locale}/*.php`). For JSON/YAML, you’d need a custom adapter or alternative package, as the tool leverages Statamic’s PHP file parsing utilities.
- What happens if I disable `refresh_caches` or `invalidate_opcache` in the config?
- Disabling these flags skips cache refreshes and OPcache invalidation after saving/syncing translations. This may leave stale translations in memory until the next cache clear or server restart, which could cause inconsistencies in production.
- Can I auto-commit changes to Git without conflicts in a team environment?
- The Git auto-commit feature assumes a standard workflow. In team environments, disable it (`git_auto_commit: false`) to avoid merge conflicts or use CI/CD hooks to handle commits post-deployment.
- Will this package work with custom caching layers like Redis beyond Statamic’s defaults?
- The package relies on Statamic’s built-in caching and OPcache invalidation. If your project uses Redis or other custom caches, test thoroughly to ensure translations reflect changes immediately after saves or syncs.
- How do I sync missing translation keys from a reference locale?
- Use the Control Panel’s sync feature to select a reference locale (e.g., `en`). The package will scan the target locale’s files and auto-populate missing keys with values from the reference, preserving existing translations.
- Is there a backup or rollback mechanism if translations are accidentally corrupted?
- The package doesn’t include built-in backups, but you can version-control your `lang/` directory or use Git’s history to revert changes. Consider adding a pre-commit hook to snapshot files before auto-commits.
- What Laravel versions are officially supported, and are there performance concerns for large translation sets?
- The package requires Laravel 12+ and PHP 8.4+. For large translation sets, test performance in staging, as bulk operations (e.g., syncing hundreds of keys) may temporarily slow the Control Panel. Optimize with `refresh_caches: false` if needed.
- Are there alternatives for managing Laravel/Statamic translations without PHP files?
- Alternatives include database-backed translation packages (e.g., `spatie/laravel-translation-loader`) or Statamic’s native translation manager for JSON/YAML. However, none offer the same CP-integrated PHP file editing workflow as this package.