salim/sonata-translation-bundle
A Sonata Admin bundle for managing Symfony translations from the admin panel. It provides an interface to browse, edit, and organize translation messages, helping teams maintain multilingual content without leaving Sonata. Designed to simplify translation workflows in Sonata-powered backends.
config/app.php provider list or php artisan vendor:publish. It plugs into sonata-project/admin-bundle, so you must already have a working SonataAdmin install (an Admin class, sonata_admin.yaml, security roles, a logged-in admin user) before this adds anything.composer.json and check the symfony/* and sonata-project/admin-bundle constraints. With 1 star, 0 dependents, and a NOASSERTION license, treat it as an untested fork. Pin the exact commit/tag and test against your installed Sonata version before committing.composer require salim/sonata-translation-bundle. If Composer rejects the name (the lineage is historically ibrows/sonata-translation-bundle), add a VCS repository entry pointing at the GitHub URL and require the actual package name from its composer.json.config/bundles.php (Flex) or AppKernel::registerBundles(), after SonataAdminBundle and the translator-related bundles.sonata_translation: (or extension alias) entry in config/routes.yaml/routing.yml pointing at the bundle's Resources/config/routing.*. Confirm the import name by reading DependencyInjection/*Extension.php and the routing filename.sonata_translation: or ibrows_sonata_translation:). Copy from DependencyInjection/Configuration.php rather than the README — the README is effectively the only "docs" and may be stale./admin, find the new "Translations" group in the sidebar, filter to one domain/locale (e.g. messages/en), edit a single key, save, then bin/console cache:clear and confirm the change renders. That round-trip tells you whether storage, permissions, and cache are all wired correctly.(domain, locale), filter untranslated entries, and edit values in Sonata's list/edit screens. Typical flow: translator filters by locale → edits → saves → cache is invalidated.staging environment and a dedicated role — never expose it on public traffic.translations/<domain>.<locale>.<format>; DB-based needs a custom loader and a warmup step. Pick one deliberately: file-based plays nicely with the native translator but requires writable directories, while DB-based survives read-only deploys but needs its own caching.bin/console cache:clear (and cache:warmup in prod). Better: hook a post-save listener to invalidate the translator cache so editors see results immediately instead of filing "it didn't save" tickets.bin/console translation:extract / translation:update to add new keys, then let editors fill values in the admin. Keep the format aligned with what the extraction command emits (XLIFF vs YAML vs PHP) or your diffs will be noisy on every save.messages, validators, admin) and scope editor roles per domain so product copy and validation strings don't collide.NOASSERTION. Treat it as an abandoned lineage; read the source, pin the commit, and plan to fork or vendor it rather than trusting the README.AbstractAdmin, datagrid, and lifecycle APIs. Old bundle code often fails at container compile time with "method not found" or missing service arguments. Check every services.xml reference against the installed Sonata version.salim/...) and the historical namespace (ibrows/...) may not line up. The extension alias and route import name come from DependencyInjection/...Extension::getAlias() and the routing filename — not the package name. Grep those classes first.translations/ (or var/translations) is group-writable, or saves fail silently or throw "failed to open stream."en when the visitor resolves to en_GB may still show a fallback. Test with the exact locale and remember Symfony's chain (en_GB → en → default).<, &, quotes, or ICU placeholders ({name}) can be mangled or break the parser. Round-trip a value with a placeholder and a <strong> tag before trusting mass edits.sonata_admin security and ROLE_*, and expose inline editing only on staging.translator (DB loader, profiler), the bundle's decorator must run in the right order or the admin reads the wrong source. Check decorates: and decoration_priority.bin/console debug:container <translator id> and bin/console debug:translation <locale> <domain> to see what's actually loaded, and the profiler's translation panel to confirm which file/key resolved.sonata_admin.yaml over patching the bundle.translations/*.xlf|*.yaml or a DB table — keep a plain export so you can migrate to symfony/translation plus a maintained editor (LexikTranslationBundle, Crowdin, etc.) without losing content if the bundle dies.How can I help you explore Laravel packages today?