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
Translatable Bundle

Translatable Bundle Laravel Package

softspring/translatable-bundle

A Symfony bundle for building translatable Doctrine entities, letting you store and manage per-locale field values with locale fallback, so the same content can be served in multiple languages without duplicating your models or templates.

View on GitHub
Deep Wiki
Context7

softspring/translatable-bundle adds transparent multi-language support to Doctrine entities in Symfony applications. Using a simple Translatable interface and trait, you can mark fields as translatable and let the bundle store each locale's values in a dedicated translation table—no schema duplication and no changes to how you query your entities.

  • Entity-first API — implement the interface, use the trait, and translate fields with setTranslations()/getTranslations()
  • Separate translation tables generated automatically for each translatable entity
  • Locale-aware accessors with fallback to a configurable default locale
  • Doctrine integration via listeners, so translations load lazily and persist with the entity
  • Form and admin friendly — manage all locales from a single object
Frequently asked questions about Translatable Bundle
Is softspring/translatable-bundle a Laravel package?
No, it is a Symfony bundle built around Doctrine ORM entity listeners and per-locale translation tables. It is not a Laravel package and has no Eloquent integration. If your application is Laravel, this is a stack mismatch, and a Laravel-specific translatable package is the better fit.
How do I install softspring/translatable-bundle?
Install it with Composer using composer require softspring/translatable-bundle, then register the bundle in your Symfony application. You will also need Doctrine ORM configured and a database schema that can hold translation tables. Check the package's composer.json for the exact PHP and Symfony version constraints before installing.
What are the requirements for softspring/translatable-bundle?
It requires Symfony and Doctrine ORM, plus a PHP version compatible with the bundle release you choose. Because minor releases in this package family have historically raised framework floors, verify the constraints in composer.json for the exact version. You also need a database schema that supports a translation table per translatable entity.
How does softspring/translatable-bundle store translations?
The bundle stores translations in separate per-locale rows, typically in a translation table associated with each translatable entity. Doctrine entity listeners handle persistence so your domain entity keeps locale-agnostic fields while translated values live alongside. You generate and review Doctrine migrations to create the expected schema.
How does locale fallback work in softspring/translatable-bundle?
Locale resolution is configurable, with a fallback order applied when a translation is missing for the requested locale. The fallback chain is part of the bundle's semantics, so test it explicitly if your content model depends on a specific order. A minor upgrade could theoretically alter fallback behavior, which is why reviewing the diff matters.
How do I make a Doctrine entity translatable with softspring/translatable-bundle?
You mark the fields you want translated on a Doctrine entity, and the bundle's listener persists per-locale values into the translation table. The exact attribute or annotation syntax depends on the bundle version, so follow the upstream documentation rather than guessing. After defining translatable fields, generate a Doctrine migration and verify the schema diff matches your expectations.
What changed in softspring/translatable-bundle v5.6.0?
v5.6.0 ships without a changelog body; the release notes contain only an auto-generated diff link from v5.5.10. Semver implies an additive, backward-compatible minor change, but that is an inference from the version string, not documentation. Review the actual diff and composer.json constraint changes before upgrading.
Is upgrading softspring/translatable-bundle from 5.5.10 to 5.6.0 safe?
Treat it as a routine minor bump only after verification. Pin to ^5.5.10|^5.6, run composer update, then run doctrine:schema:update --dump-sql and confirm the diff is empty. If the schema diff is non-empty, inspect column types, indexes, and association mappings before applying it.
What are alternatives to softspring/translatable-bundle for Laravel?
For Laravel, use an Eloquent-native package such as spatie/laravel-translatable or astrotomic/laravel-translatable instead. softspring/translatable-bundle is Doctrine-specific and does not map cleanly onto Eloquent models. Choosing a Doctrine bundle for a Laravel app creates unnecessary integration work and risk.
How do I test translatable entities with softspring/translatable-bundle?
Testing should cover locale switching, fallback order, and persistence of per-locale rows against a real Doctrine schema. Use functional tests that boot the bundle and exercise entity listeners rather than mocking the persistence layer. Also assert that a Doctrine schema diff is empty in CI so silent mapping changes surface early.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections