PHPackages                             mevisoft/laravel-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. mevisoft/laravel-translatable

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

mevisoft/laravel-translatable
=============================

A Laravel package for multilingual models

13.0.0(3y ago)0551[1 PRs](https://github.com/mevisoft/laravel-translatable/pulls)MITPHPPHP ^8.0

Since Jan 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mevisoft/laravel-translatable)[ Packagist](https://packagist.org/packages/mevisoft/laravel-translatable)[ Docs](https://astrotomic.info)[ RSS](/packages/mevisoft-laravel-translatable/feed)WikiDiscussions master Synced yesterday

READMEChangelog (9)Dependencies (7)Versions (11)Used By (0)

Introduction
============

[](#introduction)

[![Latest Version](https://camo.githubusercontent.com/9cdbc27c5c5b0bb4f970b967dc4075351fe88c9e8c7c05447b0c09b77f18d850/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617374726f746f6d69632f6c61726176656c2d7472616e736c617461626c652e7376673f6c6162656c3d52656c65617365267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/astrotomic/laravel-translatable)[![MIT License](https://camo.githubusercontent.com/ed8aafe5cb92d36db04fd6fb8ef6b669f52c5a58e3e1fe9bf242b0cd8e3c410b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f417374726f746f6d69632f6c61726176656c2d7472616e736c617461626c652e7376673f6c6162656c3d4c6963656e736526636f6c6f723d626c7565267374796c653d666f722d7468652d6261646765)](https://github.com/Astrotomic/laravel-translatable/blob/master/LICENSE)[![Offset Earth](https://camo.githubusercontent.com/d204555ebe1fb0ae82d10c97b4f4ffc2dfdd2ba1489f98be7f7e8708333a0466/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d677265656e3f7374796c653d666f722d7468652d6261646765)](https://plant.treeware.earth/Astrotomic/laravel-translatable)[![Larabelles](https://camo.githubusercontent.com/a2c8d5126ddd8c5ddc627176d1d2e0568f8399b50038e71fd7f774c3e24dbe4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726162656c6c65732d2546302539462541362538342d6c6967687470696e6b3f7374796c653d666f722d7468652d6261646765)](https://www.larabelles.com/)

[![GitHub Workflow Status](https://camo.githubusercontent.com/51a1c3887e6def32c95b928269d6ef22e717c0e0749124ce3f47f12c0c29f02f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f417374726f746f6d69632f6c61726176656c2d7472616e736c617461626c652f72756e2d74657374733f7374796c653d666c61742d737175617265266c6f676f436f6c6f723d7768697465266c6f676f3d676974687562266c6162656c3d5465737473)](https://github.com/Astrotomic/laravel-translatable/actions?query=workflow%3Arun-tests)[![StyleCI](https://camo.githubusercontent.com/441921e71dc978979cfc4f7a88d12a197cd248ff792d06d5d419faa92f359225/68747470733a2f2f7374796c6563692e696f2f7265706f732f3139323333333534392f736869656c64)](https://styleci.io/repos/192333549)[![Codecov Coverage](https://camo.githubusercontent.com/b6218ba08d93f90e4ee5244687e568736b4322bbbb331641aa422136edd63357/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f417374726f746f6d69632f6c61726176656c2d7472616e736c617461626c653f6c6f676f3d636f6465636f76266c6f676f436f6c6f723d7768697465266c6162656c3d436f6465636f76267374796c653d666c61742d737175617265)](https://codecov.io/gh/Astrotomic/laravel-translatable)[![Total Downloads](https://camo.githubusercontent.com/4a6417dee2fbd15479b31fc0666dbb309831c890af7d012e0e21d47ea82f3b78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617374726f746f6d69632f6c61726176656c2d7472616e736c617461626c652e7376673f6c6162656c3d446f776e6c6f616473267374796c653d666c61742d737175617265)](https://packagist.org/packages/astrotomic/laravel-translatable)[![GitBook](https://camo.githubusercontent.com/011412a630df92fdc201017b8f783e2920e411c986c8d1b7b1c91f77a2363404/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476974426f6f6b2d417374726f746f6d69632d3765353763322e7376673f7374796c653d666c61742d737175617265)](https://docs.astrotomic.info/laravel-translatable)

 [![laravel-translatable socialcard](/art/socialcard.png)](/art/socialcard.png)

**If you want to store translations of your models into the database, this package is for you.**

This is a Laravel package for translatable models. Its goal is to remove the complexity in retrieving and storing multilingual model instances. With this package you write less code, as the translations are being fetched/saved when you fetch/save your instance.

The full documentation can be found at [GitBook](https://docs.astrotomic.info/laravel-translatable).

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

[](#installation)

```
composer require mevisoft/laravel-translatable
```

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

[](#quick-example)

### **Getting translated attributes**

[](#getting-translated-attributes)

```
$post = Post::first();
echo $post->translate('en')->title; // My first post

App::setLocale('en');
echo $post->title; // My first post

App::setLocale('de');
echo $post->title; // Mein erster Post
```

### **Saving translated attributes**

[](#saving-translated-attributes)

```
$post = Post::first();
echo $post->translate('en')->title; // My first post

$post->translate('en')->title = 'My cool post';
$post->save();

$post = Post::first();
echo $post->translate('en')->title; // My cool post
```

### **Filling multiple translations**

[](#filling-multiple-translations)

```
$data = [
  'author' => 'Gummibeer',
  'en' => ['title' => 'My first post'],
  'fr' => ['title' => 'Mon premier post'],
];
$post = Post::create($data);

echo $post->translate('fr')->title; // Mon premier post
```

Tutorials
---------

[](#tutorials)

- [How To Add Multilingual Support to Eloquent](https://laravel-news.com/how-to-add-multilingual-support-to-eloquent)
- [How To Build An Efficient and SEO Friendly Multilingual Architecture For Your Laravel Application](https://mydnic.be/post/how-to-build-an-efficient-and-seo-friendly-multilingual-architecture-for-your-laravel-application)
- [How to Add Multi-Language Models to Laravel QuickAdminPanel](https://quickadminpanel.com/blog/how-to-add-multi-language-models-to-laravel-quickadminpanel/)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](docs/changelog.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) for details. You could also be interested in [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md).

### Security

[](#security)

If you discover any security related issues, please check [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) for steps to report it.

Credits
-------

[](#credits)

- [Tom Witkowski](https://github.com/Gummibeer) *current maintainer*
- [Dimitrios Savvopoulos](https://github.com/dimsav) *original author*
- [David Llop](https://github.com/Lloople) *refactoring testsuite*
- [Caneco](https://github.com/caneco) *artwork*
- [All Contributors](../../contributors)

Versions
--------

[](#versions)

PackageLaravelPHP**v11.6 - v11.9**`5.8.* / 6.* / 7.* / 8.*``>=7.2`**v11.4 - v11.5**`5.6.* / 5.7.* / 5.8.* / 6.*``>=7.1.3`**v11.0 - v11.3**`5.6.* / 5.7.* / 5.8.*``>=7.1.3`Treeware
--------

[](#treeware)

You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees at [offset.earth/treeware](https://plant.treeware.earth/Astrotomic/laravel-translatable)

Read more about Treeware at [treeware.earth](https://treeware.earth)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50.9% 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 ~71 days

Recently: every ~142 days

Total

9

Last Release

1427d ago

Major Versions

11.9.5 → 12.0.02021-11-02

12.0.2 → 13.0.02022-08-07

PHP version history (3 changes)11.9.1PHP &gt;=7.2

12.0.0PHP &gt;=7.3

13.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/78180dafee6a59dead5489c314b2856d2ad528959d1b62bcea2ad0b8f40ab334?d=identicon)[mevisoft](/maintainers/mevisoft)

---

Top Contributors

[![Gummibeer](https://avatars.githubusercontent.com/u/6187884?v=4)](https://github.com/Gummibeer "Gummibeer (492 commits)")[![dimsav](https://avatars.githubusercontent.com/u/1785686?v=4)](https://github.com/dimsav "dimsav (357 commits)")[![Lloople](https://avatars.githubusercontent.com/u/5665466?v=4)](https://github.com/Lloople "Lloople (27 commits)")[![netdown](https://avatars.githubusercontent.com/u/4265403?v=4)](https://github.com/netdown "netdown (15 commits)")[![sdebacker](https://avatars.githubusercontent.com/u/134503?v=4)](https://github.com/sdebacker "sdebacker (10 commits)")[![mevisoft](https://avatars.githubusercontent.com/u/56488338?v=4)](https://github.com/mevisoft "mevisoft (9 commits)")[![johannesschobel](https://avatars.githubusercontent.com/u/9431350?v=4)](https://github.com/johannesschobel "johannesschobel (7 commits)")[![ahmed-aliraqi](https://avatars.githubusercontent.com/u/23261109?v=4)](https://github.com/ahmed-aliraqi "ahmed-aliraqi (5 commits)")[![cbl](https://avatars.githubusercontent.com/u/29352871?v=4)](https://github.com/cbl "cbl (4 commits)")[![easteregg](https://avatars.githubusercontent.com/u/188798?v=4)](https://github.com/easteregg "easteregg (4 commits)")[![Hyleeh](https://avatars.githubusercontent.com/u/5340560?v=4)](https://github.com/Hyleeh "Hyleeh (3 commits)")[![caneco](https://avatars.githubusercontent.com/u/502041?v=4)](https://github.com/caneco "caneco (3 commits)")[![derekmd](https://avatars.githubusercontent.com/u/823566?v=4)](https://github.com/derekmd "derekmd (2 commits)")[![deargonaut](https://avatars.githubusercontent.com/u/5047107?v=4)](https://github.com/deargonaut "deargonaut (2 commits)")[![lan0](https://avatars.githubusercontent.com/u/7386264?v=4)](https://github.com/lan0 "lan0 (2 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (2 commits)")[![shadoWalker89](https://avatars.githubusercontent.com/u/1449151?v=4)](https://github.com/shadoWalker89 "shadoWalker89 (2 commits)")[![ShortlyMAB](https://avatars.githubusercontent.com/u/4995979?v=4)](https://github.com/ShortlyMAB "ShortlyMAB (2 commits)")[![tintamarre](https://avatars.githubusercontent.com/u/409734?v=4)](https://github.com/tintamarre "tintamarre (2 commits)")[![yakidahan](https://avatars.githubusercontent.com/u/7757560?v=4)](https://github.com/yakidahan "yakidahan (2 commits)")

---

Tags

laravellocalizationtranslationslanguagedatabasetranslationeloquent

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mevisoft-laravel-translatable/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

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

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M195](/packages/laravel-ai)[astrotomic/laravel-translatable

A Laravel package for multilingual models

1.4k8.3M148](/packages/astrotomic-laravel-translatable)[watson/validating

Eloquent model validating trait.

9803.5M54](/packages/watson-validating)

PHPackages © 2026

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