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.1.1(9mo ago)11191[1 PRs](https://github.com/jonaaix/eloquent-translatable/pulls)MITPHPPHP ^8.1CI passing

Since Jul 21Pushed 9mo 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 1mo ago

READMEChangelogDependencies (10)Versions (6)Used By (0)

 [ ![Laravel Eloquent Translatable Logo](https://raw.githubusercontent.com/jonaaix/eloquent-translatable/main/docs/static/img/logo2.png) ](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

35

—

LowBetter than 79% of packages

Maintenance60

Regular maintenance activity

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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 ~2 days

Total

5

Last Release

281d 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 (63 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

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M46](/packages/watson-validating)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

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