astrotomic/laravel-translatable
Laravel package for translatable Eloquent models. Store model translations in the database and automatically fetch/save the correct locale with minimal code. Simplifies retrieving and persisting multilingual attributes across your app.
Adopt this package if:
$post->translate('es')->title).Look elsewhere if:
trans() helper and language files.es_ES vs. es_MX) → Consider a package like spatie/laravel-translatable or a custom solution.json column in the main table).*"This package lets us ship multilingual features faster with less risk. Instead of spending months building custom translation logic, we can leverage a proven, community-supported solution that:
Ask: "Should we prioritize this for [specific feature/region]?"
*"This is a drop-in solution for multilingual Eloquent models that handles the heavy lifting:
$model->translate('locale')->attribute or dynamic locale switching.*_translations table (e.g., posts_translations) with foreign keys, avoiding denormalization.getTranslationsArray() for bulk operations).Trade-offs:
trans() instead).Proposal:
['en', 'es_MX', 'fr_CA']).Next steps:
Ask: "Does this fit our architecture, or should we explore [alternative] for [specific need]?"
How can I help you explore Laravel packages today?