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
Doctrine Simple Translation Type Bundle

Doctrine Simple Translation Type Bundle Laravel Package

softspring/doctrine-simple-translation-type-bundle

A Symfony bundle that adds a Doctrine DBAL type for simple translations, letting you store translatable strings in a single column instead of separate locale fields. Lightweight and easy to register, though it has little adoption and limited documentation.

View on GitHub
Deep Wiki
Context7

This package provides a simple translation type for doctrine using JSON type.

Frequently asked questions about Doctrine Simple Translation Type Bundle
Can I use softspring/doctrine-simple-translation-type-bundle in Laravel?
Not directly. It is a Symfony bundle built around Symfony's bundle registration, DependencyInjection extensions, and config/bundles.php, none of which exist in a standard Laravel app. You can only use it in Laravel if the app already runs Doctrine ORM through something like laravel-doctrine/orm, and even then you must replace the Symfony wiring with your own glue code. For a typical Eloquent-based Laravel service, it is the wrong dependency.
How do I register this Doctrine DBAL type manually in Laravel?
You skip the Symfony bundle and register the custom DBAL type in your Doctrine configuration, typically via doctrine.dbal.types in config/doctrine.php when using laravel-doctrine/orm. Any bundle services for translation resolution must be re-declared in a custom Laravel ServiceProvider. Treat that bridge as code you own and cover with tests, because the package does not ship Laravel integration.
Does this package work with Eloquent or only Doctrine ORM?
Only Doctrine ORM and DBAL. The package provides a Doctrine DBAL type that maps a translated value to a single database column, and Eloquent has no concept of DBAL custom types. If your Laravel models are Eloquent models, this package does not apply. Use a Laravel-native translation approach instead.
Which Laravel and Doctrine versions are supported?
The package targets Symfony and Doctrine, not Laravel, so there is no Laravel version support matrix. Before adopting it, confirm three axes: your PHP minor version, your Doctrine DBAL major version, and your Doctrine ORM version, because the custom type must be compatible with the DBAL version you pin. Pin the bundle and DBAL versions together in composer.json and treat bumps of either as coordinated changes.
How does storing all locales in one column actually work?
The DBAL type stores all locale variants of a field in a single column using a structured array or JSON format and resolves the correct value per locale with fallback behavior. That avoids extra translation tables and separate translatable entity mappings. The tradeoff is that querying or indexing individual translations is less direct than with a normalized translation table.
Is softspring/doctrine-simple-translation-type-bundle production-ready?
It is a small, single-vendor micro-bundle with little adoption and limited documentation, so assess continuity risk. The v5.3.x release line suggests a stable, backward-compatible line with patch cadence, but that is not the same as broad production validation. For critical translation storage, prefer a better-documented Laravel-native solution unless you already have a Doctrine commitment.
What changed in v5.3.15 and should I upgrade?
The release ships with no changelog beyond a compare URL, so you cannot assess the change surface from metadata. Diff the v5.3.14 to v5.3.15 tag before upgrading, paying attention to DBAL type registration details, type naming, and null or fallback handling. Treat the release itself as neither a risk nor a fix until you have inspected the diff.
What are Laravel-native alternatives for translatable fields?
For Eloquent apps, JSON columns plus a package such as spatie/laravel-translatable, or a dedicated translations table, are the usual choices. These avoid a cross-framework seam and do not require Doctrine. Compare them on query needs, fallback behavior, and admin editing workflows before considering a Doctrine-based type.
Do I need a custom service provider to use this in Laravel?
Yes, if you adopt it at all. The Symfony bundle's service definitions may reference container features or readers that do not exist in a Laravel-resolved container, so you must re-declare the translation repository or resolver behavior in a Laravel ServiceProvider. Budget this as custom glue code with its own tests, not as a package install.
What are the main risks of using a Symfony bundle in a Laravel project?
Framework mismatch is the dominant risk, not code quality. Every upgrade of the bundle can break your hand-written bridge with no upstream support obligation, and the empty changelog makes changes opaque. There is also single-vendor continuity risk given the small consumer base. Run a timeboxed spike on a throwaway branch before committing.
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