servergrove/translation-editor-bundle
ServerGrove TranslationEditorBundle adds a browser-based translation editor to Symfony applications. Browse and edit message catalogs for each locale, manage keys, and keep your YAML or PHP translation files current without leaving the app.
composer require servergrove/translation-editor-bundle. This is a Symfony 2-era bundle, so pin a compatible version (~1.0) and do not expect it to install cleanly on Symfony 3+ without a fork.app/AppKernel.php in the dev environment only (see Gotchas — exposing this in prod is a security hole).# app/config/routing_dev.yml
_translation_editor:
resource: "@ServerGroveTranslationEditorBundle/Resources/config/routing.yml"
prefix: /_translations
servergrove_translation_editor; check the package README for the exact keys in the version you install, because they changed across releases. The shape is roughly:
servergrove_translation_editor:
translations:
- path: "%kernel.root_dir%/../src/Acme/AppBundle/Resources/translations"
- path: "%kernel.root_dir%/../app/Resources/translations"
/_translations, pick a domain/locale, find a key you know exists in messages.en.yml, edit it, save, and confirm the file changed on disk. That end-to-end click is the whole value proposition; verify it before trusting the tool with bulk edits.Dev-only editing loop. The natural workflow is: add new {{ 'some.key'|trans }} usages in templates, run app/console translation:debug en to surface missing keys, then open the editor to fill in the gaps across locales in one grid. The editor's spreadsheet layout (keys as rows, locales as columns) is the reason to use it over hand-editing YAML.
Keep it out of production. Register the bundle and route only in config_dev.yml/routing_dev.yml. If you must reach it from a shared staging box, add an access_control rule limiting it to ROLE_ADMIN or a source IP:
# config_dev.yml
security:
access_control:
- { path: ^/_translations, roles: ROLE_ADMIN, requires_channel: https }
Scope the scan deliberately. Don't point it at the whole src/ tree at once on a large app — scanning is synchronous and the grid becomes slow and cluttered. Configure one or a few explicit translation directories, and split work by bundle or domain.
One domain at a time. Editing messages and validators in the same session invites accidental cross-domain saves. Treat domains as separate editing passes.
Review the diff before committing. The bundle round-trips files through Symfony's loaders/dumpers, so saving rewrites the file. Run git diff after a bulk edit session and stage only what you intended. This is also how you catch formatting churn and dropped comments.
Pair with translation:debug for verification. After edits, clear the dev cache (translation caching bites here) and re-run translation:debug <locale> to confirm keys resolve and no placeholders were damaged.
prod. If you deviate, guard it behind authentication and HTTPS.state attributes, and custom nodes in XLIFF can be dropped. For XLIFF-heavy workflows, prefer a dedicated translation tool.app/console cache:clear). Script this into your habit after a session.var/logs/dev.log for the actual error.messages.fr.yml may not appear as a column until the file exists; create the file (or let the dumper create it) first.%name% or {{ var }} placeholders. Add a quick grep or translation:debug check after bulk edits — mangled placeholders fail silently at runtime.How can I help you explore Laravel packages today?