laravel-translatable
laravel-translatable is a Laravel package that simplifies storing and retrieving multilingual content for Eloquent models. It allows developers to manage translations directly on models without complex queries or manual relation handling.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | Astrotomic/laravel-translatable |
| Owner | Astrotomic |
| Primary language | PHP |
| License | MIT — OSI-approved |
| Stars | 1.4k |
| Forks | 176 |
| Open issues | 35 |
| Latest release | v11.17.0 (2026-03-27) |
| Last updated | 2026-06-19 |
| Source | https://github.com/Astrotomic/laravel-translatable |
What laravel-translatable is
A Laravel Eloquent trait-based package that implements a polymorphic translation pattern, storing translations in a separate database table and providing accessor/mutator syntax for fluent retrieval and persistence across locales. Integrates with Laravel's service container and app locale system.
Get the laravel-translatable source
Clone the repository and explore it locally.
git clone https://github.com/Astrotomic/laravel-translatable.gitcd laravel-translatable# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires a separate translation table per translatable model; ensure your database schema includes `translatable` relation configuration and locale-keyed translation records.
- Trait-based implementation means translatable models must explicitly use the `Translatable` trait; check all models needing i18n are properly configured.
- Performance varies with number of locales and translation queries; use eager loading (`with('translations')`) to avoid N+1 queries in list views.
- The package respects Laravel's `app()->getLocale()` for default locale switching; ensure your locale middleware or configuration sets this correctly.
- Mass assignment and attribute casting interact with the trait; review config for `fillable`, `guarded`, and `casts` to avoid unexpected behavior.
When to avoid it — and what to weigh
- High-volume real-time translation needs — If you need machine translation or dynamic language inference, this package only manages stored translations; it does not translate content.
- Polyglot database schemas — If your data model already has denormalized translation columns per language or uses a document-oriented store, retrofitting this package may add unnecessary joins.
- Minimal or single-language requirements — For projects with no multilingual scope, the package overhead (extra tables, trait logic) is not justified.
- Non-Laravel ecosystems — This is a Laravel-specific package; it cannot be used outside Laravel or with other frameworks without significant rewriting.
License & commercial use
MIT License (Expat variant). Permissive OSI-approved license: unrestricted use, modification, and distribution permitted in proprietary and open-source projects with attribution and no liability.
MIT permits commercial use without restriction. Attribution is encouraged but not legally required. No license fees or usage restrictions apply. Review the full LICENSE file for exact terms, but no special commercial licensing needed.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
No explicit security vulnerabilities noted in the data provided. Standard Laravel input validation and ORM safety apply. If storing user-generated translation content, sanitize input before saving to prevent injection. The package does not encrypt translations at rest; use Laravel encryption features if sensitive translations are stored.
Alternatives to consider
spatie/laravel-translatable
Industry-standard alternative with similar trait-based API; arguably more widely adopted in Laravel ecosystem. Compare documentation, release cadence, and issue resolution speed for your use case.
mcamara/laravel-localization
Broader localization package handling routes, views, and middleware alongside models. Use if you need URL-level locale routing or view-level translation in addition to model translations.
Custom polymorphic translation table with Eloquent relations
Build your own if you need non-standard translation logic (e.g., versioning, approval workflows, or language-specific validation rules) not covered by off-the-shelf packages.
Build on laravel-translatable with DEV.co software developers
Evaluate laravel-translatable against your project's localization needs. If you need production support, integration guidance, or custom multilingual architecture, our Laravel specialists can help.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
laravel-translatable FAQ
Does this package translate content automatically?
Can I use this with other Laravel packages like spatie/laravel-permission?
What happens if a translation is missing for the current locale?
Is this suitable for high-traffic production applications?
Software developers & web developers for hire
Adopting laravel-translatable is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source databases software in production.
Ready to add multilingual support to your Laravel app?
Evaluate laravel-translatable against your project's localization needs. If you need production support, integration guidance, or custom multilingual architecture, our Laravel specialists can help.