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

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

veltix/laravel-translatable
===========================

A Laravel package for multilingual models

1.0.0(2y ago)04MITPHPPHP ^8.0

Since Apr 16Pushed 2y agoCompare

[ Source](https://github.com/Veltix/laravel-translatable)[ Packagist](https://packagist.org/packages/veltix/laravel-translatable)[ Docs](https://astrotomic.info)[ RSS](/packages/veltix-laravel-translatable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)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 astrotomic/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.12 - v11.12**`8.* / 9.* / 10.*``^8.0`**v11.10 - v11.11**`8.* / 9.*``^8.0`**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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.5% 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

Unknown

Total

1

Last Release

756d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2bc1d8551638205f4ec624ec9bd3619e16f0dd94baa576246eaf90d08f631c8?d=identicon)[Veltix](/maintainers/Veltix)

---

Top Contributors

[![Gummibeer](https://avatars.githubusercontent.com/u/6187884?v=4)](https://github.com/Gummibeer "Gummibeer (545 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)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (26 commits)")[![netdown](https://avatars.githubusercontent.com/u/4265403?v=4)](https://github.com/netdown "netdown (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (14 commits)")[![sdebacker](https://avatars.githubusercontent.com/u/134503?v=4)](https://github.com/sdebacker "sdebacker (10 commits)")[![johannesschobel](https://avatars.githubusercontent.com/u/9431350?v=4)](https://github.com/johannesschobel "johannesschobel (7 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (6 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)")[![chrillep](https://avatars.githubusercontent.com/u/1267931?v=4)](https://github.com/chrillep "chrillep (3 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)")[![plmarcelo](https://avatars.githubusercontent.com/u/205708?v=4)](https://github.com/plmarcelo "plmarcelo (2 commits)")[![prime-hacker](https://avatars.githubusercontent.com/u/20490162?v=4)](https://github.com/prime-hacker "prime-hacker (2 commits)")[![rb1193](https://avatars.githubusercontent.com/u/13665741?v=4)](https://github.com/rb1193 "rb1193 (2 commits)")[![alfhen](https://avatars.githubusercontent.com/u/5700924?v=4)](https://github.com/alfhen "alfhen (2 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (2 commits)")

---

Tags

laravellanguagedatabasetranslation

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[astrotomic/laravel-translatable

A Laravel package for multilingual models

1.4k7.7M114](/packages/astrotomic-laravel-translatable)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[clickbar/laravel-magellan

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

423715.4k1](/packages/clickbar-laravel-magellan)[dragon-code/migrate-db

Easy data transfer from one database to another

15717.4k](/packages/dragon-code-migrate-db)[ntanduy/cloudflare-d1-database

Easy configuration and setup for D1 Database connections in Laravel.

215.4k](/packages/ntanduy-cloudflare-d1-database)

PHPackages © 2026

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