PHPackages                             aaix/eloquent-translatable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. aaix/eloquent-translatable

ActiveLibrary[Database &amp; ORM](/categories/database)

aaix/eloquent-translatable
==========================

High performance translations for Laravel models.

v1.2.1(2mo ago)12361[1 issues](https://github.com/jonaaix/eloquent-translatable/issues)MITPHPPHP ^8.1CI passing

Since Jul 21Pushed 2mo agoCompare

[ Source](https://github.com/jonaaix/eloquent-translatable)[ Packagist](https://packagist.org/packages/aaix/eloquent-translatable)[ Docs](https://github.com/jonaaix/eloquent-translatable)[ RSS](/packages/aaix-eloquent-translatable/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (21)Versions (9)Used By (0)

 [ ![Laravel Eloquent Translatable Logo](https://camo.githubusercontent.com/57514cefba1cf79a050f318aac128c3bd0e1dd0c874563135f5d3893fd1e4017/68747470733a2f2f6a6f6e616169782e6769746875622e696f2f656c6f7175656e742d7472616e736c617461626c652f696d672f6c6f676f322e706e67) ](https://github.com/jonaaix/eloquent-translatable)

Laravel Eloquent Translatable
=============================

[](#laravel-eloquent-translatable)

High performance, developer-first translations for Laravel models.

 [![Latest Version on Packagist](https://camo.githubusercontent.com/7bd3cfa3609d14709cb092b11e6800ecacca688ca108a5356d79d3332b1d97dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616169782f656c6f7175656e742d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aaix/eloquent-translatable) [![Total Downloads](https://camo.githubusercontent.com/5c94bb33331e655333ccb39e582a45dd82ad912ac798e3cfa3eff9a67f1e0f5f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616169782f656c6f7175656e742d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aaix/eloquent-translatable) [![GitHub Actions](https://camo.githubusercontent.com/dfe6b82c8ccb498a64ac0a9979cd04c29613b3807b60839d03e3c39fd5cffa5a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6f6e616169782f656c6f7175656e742d7472616e736c617461626c652f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jonaaix/eloquent-translatable/actions/workflows/tests.yml) [![License](https://camo.githubusercontent.com/63dd60c49bbf2064230d451d25a7eb15d09f69addd882cd2ba0a242fcf0407ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616169782f656c6f7175656e742d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/jonaaix/eloquent-translatable/blob/main/LICENSE.md)

---

**Eloquent Translatable** is a Laravel package built for raw performance and a clean, focused developer experience. It uses direct, indexed database queries instead of relying on JSON columns or complex Eloquent model hydration, making it significantly fast and memory-efficient.

Key Features
------------

[](#key-features)

- **✨ Intuitive API:** A clean, fluent, and predictable interface.
- **🤝 Spatie-Compatible:** Optional API compatibility with `spatie/laravel-translatable`.
- **🚀 Performance-First:** Designed for speed at scale. No Eloquent overhead, no JSON parsing.
- **🔒 Secure by Default:** Explicitly define which attributes are translatable.
- **⚙️ Artisan Command:** Scaffold translation migrations with a single command.
- **🛡️ Enum-Powered:** Ships with a `Locale` enum for type-safe, readable code.

Documentation
-------------

[](#documentation)

For the full documentation, please visit our **[documentation website](https://jonaaix.github.io/eloquent-translatable)**.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require aaix/eloquent-translatable
```

Quick Example
-------------

[](#quick-example)

1. **Prepare your model:**

    ```
    // app/Models/Product.php
    namespace App\Models;

    use Aaix\EloquentTranslatable\Traits\HasTranslations;
    use Illuminate\Database\Eloquent\Model;

    class Product extends Model
    {
        use HasTranslations;

        public array $translatable = ['name', 'description'];
    }
    ```
2. **Store and access translations:**

    ```
    use Aaix\EloquentTranslatable\Enums\Locale;

    $product = Product::create(['name' => 'My awesome product']);

    // Store a translation
    $product->storeTranslation('name', Locale::GERMAN, 'Mein tolles Produkt');

    // Access it (will fall back to the app's locale)
    app()->setLocale('de');
    echo $product->name; // Output: Mein tolles Produkt

    // Or get a specific locale
    echo $product->getTranslation('name', Locale::GERMAN); // Output: Mein tolles Produkt
    ```

Testing
-------

[](#testing)

To run the package's test suite, clone the repository and run:

```
composer install
composer test
```

Contributing
------------

[](#contributing)

Contributions are welcome!

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance67

Regular maintenance activity

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~40 days

Recently: every ~68 days

Total

8

Last Release

62d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d8ec042829e0d4060243b6c1067768dd31773ace52982c6ac4a4fbef207cbfd?d=identicon)[aaix](/maintainers/aaix)

---

Top Contributors

[![jonaaix](https://avatars.githubusercontent.com/u/15804690?v=4)](https://github.com/jonaaix "jonaaix (74 commits)")

---

Tags

eloquenti18nlaravellocalizationperformancetranslationtranslationslaravellocalizationi18nperformancetranslationeloquenttranslatable

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/aaix-eloquent-translatable/health.svg)

```
[![Health](https://phpackages.com/badges/aaix-eloquent-translatable/health.svg)](https://phpackages.com/packages/aaix-eloquent-translatable)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M630](/packages/spatie-laravel-medialibrary)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
