Weave 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

Translation Editor Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Install with Composer: 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.
  2. Register the bundle in app/AppKernel.php in the dev environment only (see Gotchas — exposing this in prod is a security hole).
  3. Import its routing under a prefix you control:
    # app/config/routing_dev.yml
    _translation_editor:
        resource: "@ServerGroveTranslationEditorBundle/Resources/config/routing.yml"
        prefix: /_translations
    
  4. Point it at the translation directories to scan. The bundle reads file paths and formats from config under 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"
    
  5. Ensure the web server user can write to those directories — the editor dumps files back in place.
  6. First use case: open /_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.

Implementation Patterns

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.

Gotchas and Tips

  • Unmaintained / Symfony 2 only. Low stars and zero dependents means no community pressure to fix bugs. Budget for a fork or a migration plan if the app moves to Symfony 3+.
  • Security exposure. A web UI that writes translation files is a privileged surface. Never register the bundle or route in prod. If you deviate, guard it behind authentication and HTTPS.
  • Dumper reformatting. YAML files typically lose comments, get reordered, and have quoting/indentation normalized on save. Commit the formatting change once so future diffs stay clean, and avoid hand-maintaining comments in editable domains.
  • XLIFF and PHP formats round-trip lossily. Metadata, state attributes, and custom nodes in XLIFF can be dropped. For XLIFF-heavy workflows, prefer a dedicated translation tool.
  • Translator cache. Symfony caches compiled translations. Editing files via the web UI won't show up until you clear the dev cache (app/console cache:clear). Script this into your habit after a session.
  • File permissions. The classic symptom is a successful-looking save with no disk change — almost always the web user lacking write access. Check var/logs/dev.log for the actual error.
  • Locale discovery is filename-based. A missing messages.fr.yml may not appear as a column until the file exists; create the file (or let the dumper create it) first.
  • Placeholder integrity. The grid lets you freely edit translation values, but nothing validates %name% or {{ var }} placeholders. Add a quick grep or translation:debug check after bulk edits — mangled placeholders fail silently at runtime.
  • Low bus factor. Read the source for config keys rather than trusting blog posts; the README for this bundle is thin and version drift is likely. The bundle's data provider and file loader are small and worth skimming when something misbehaves.
  • Extension point: if you need richer validation or a different storage backend, the file-loading/dumping layer is the place to adapt — but given the maintenance state, wrapping it or replacing it with a maintained alternative may be the better call.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle