Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Statamic Translate Lang Files

Statamic Translate Lang Files Laravel Package

bit-mx/statamic-translate-lang-files

Edit Laravel/Statamic language files from the Statamic Control Panel. Browse locales and lang groups, update keys, save back to lang/{locale}/*.php, sync missing keys from a reference locale, optionally refresh caches, invalidate OPcache, and auto-commit to Git.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Statamic Translate Lang Files
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.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky