Weave Code
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

Laravel Translatable Laravel Package

latevaweb/laravel-translatable

Add translatable Eloquent attributes backed by a Translations database table. Use a Translatable trait to set/get per-locale values, auto-resolve attributes by current app locale, and store translations via polymorphic relations.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Multilingual Content Strategy: Enables dynamic, locale-aware content without bloating model schemas (e.g., title_en, title_es). Ideal for global products (e.g., e-commerce, SaaS platforms) with localized UI/text.
  • Roadmap for i18n Features: Accelerates development of translation-heavy features (e.g., CMS, user-generated content) by reducing boilerplate. Aligns with roadmap items like "Localization Overhaul" or "Market Expansion."
  • Build vs. Buy: Buy—avoids reinventing translation storage/access patterns. Justification: Low maintenance burden (MIT license), Laravel-native, and minimal dependencies.
  • Use Cases:
    • Product Descriptions: Translate product_name, description, or meta_tags per locale.
    • User Profiles: Store greeting, bio, or preferences in multiple languages (e.g., for expat users).
    • Admin Panels: Localize dashboard labels or error messages without hardcoding.
    • Legacy Migration: Retrofit translations to existing models without schema changes.

When to Consider This Package

Adopt if:

  • Your Laravel app (8.x) requires dynamic, attribute-level translations (not static JSON files or database columns per locale).
  • You prioritize developer velocity over customization (e.g., no need for advanced features like fallback locales or bulk translation).
  • Your team lacks bandwidth to build/maintain a translation system from scratch.
  • You’re using Eloquent models and want to avoid polymorphic relationships or JSON columns for translations.

Look elsewhere if:

  • You need Laravel 9+/10+ support (package is untested; risk of breaking changes).
  • You require advanced features:
    • Fallback locales (e.g., enes if es missing).
    • Bulk translation imports/exports.
    • Translation approval workflows.
  • Your app uses non-Eloquent data layers (e.g., raw SQL, non-Laravel ORMs).
  • You’re constrained by database schema changes (this package adds a translations table).
  • You prefer serverless or headless architectures (package assumes Laravel’s service container).

Alternatives to Evaluate:

  • spatie/laravel-translatable: More stars, active maintenance, supports Laravel 9+.
  • Custom Solution: If translations are simple (e.g., only 2–3 fields), use JSON columns or separate tables.
  • Third-Party APIs: For scalable needs (e.g., Crowdin, Lokalise), offload storage/retrieval.

How to Pitch It (Stakeholders)

For Executives: "This package lets us ship multilingual features faster with minimal engineering overhead. For example, we can launch a Spanish version of our product in weeks instead of months by translating just 5–10 key attributes (like product names or CTAs) without adding complexity. It’s a lightweight, Laravel-native solution that avoids vendor lock-in—we own the data in our own database. The tradeoff? We’ll need to add a single translations table, but the payoff is immediate flexibility for localization, which directly supports our [Q3 market expansion goal]."

For Engineering: *"This is a drop-in trait for Eloquent models that stores translations in a separate table, keeping our schema clean. Key benefits:

  • Zero boilerplate: Add use Translatable and declare $translatable = ['field1', 'field2'] to enable translations.
  • Performance: Optimized to avoid N+1 queries (fixed in v0.1.6).
  • Laravel 8.x only: If we’re locked into L8, this is production-ready. For L9+, we’d need to evaluate alternatives like spatie/laravel-translatable.
  • Migration path: We can phase this in for high-impact models (e.g., Product, Page) and monitor before rolling out broadly. Risk: The package is unmaintained, but the fix for L8 suggests responsiveness. We’d want to add a test suite for our critical use cases."*

For Design/Content Teams: *"This tool will let you manage translations directly in the database, so you can update copy without developer help. For example, you’ll be able to:

  • Edit a product description in English and Spanish from the same interface.
  • See all translations for an item in one place (no more hunting through title_en, title_es columns).
  • Work with our existing CMS workflows since it integrates with Eloquent. We’ll need to train you on the new translation fields, but the goal is to make localization as easy as editing any other content."
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.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours