Laravel Translatable
Trait that makes Eloquent models translatable, storing the translations as JSON in the model's own columns.
spatie.be/docs/laravel-translatablerepositorydocs
Laravel Translatable adds the HasTranslations trait to Eloquent models, so that chosen attributes keep one value per locale. The translations are stored as JSON in the model’s own columns, and no table of its own is needed. A model declares its translatable attributes with the Translatable attribute or a $translatable property. The trait then writes and reads one locale with setTranslation and getTranslation, and filters records by locale with queries such as whereLocale. The package requires Laravel.
Worth knowing
Each translatable column has to be a JSON column. The installation page says text columns can stand in where the database has no JSON type. Case-insensitive search across translations depends on the database, and SQLite converts only ASCII letters.
Sources
- 2026-11-16: links
spatie.be/docs/laravel-translatable - 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/spatie/laravel-translatable - 2026-11-16: links, Install with
spatie.be/docs/laravel-translatable/v6/installation-setup - 2026-11-16: Maintainer, License, License model
github.com/spatie/laravel-translatable/blob/main/LICENSE.md - 2026-11-16: Headquarters
spatie.be/disclaimer - 2026-11-16: First release
api.github.com/repos/spatie/laravel-translatable/releases?per_page=100 - 2026-11-16: Categories
spatie.be/docs/laravel-translatable/v6/introduction - 2026-11-16: Runtime, Minimum runtime
github.com/spatie/laravel-translatable/blob/6.15.0/composer.json - 2026-11-16: Databases
spatie.be/docs/laravel-translatable/v6/requirements - 2026-11-16: Databases
spatie.be/docs/laravel-translatable/v6/basic-usage/querying-translations - 2026-11-16: Current major version, Last release
api.github.com/repos/spatie/laravel-translatable/releases - 2026-11-16: Contributors
api.github.com/repos/spatie/laravel-translatable/contributors?per_page=1 - 2026-11-16: Packagist downloads
packagist.org/packages/spatie/laravel-translatable.json