PHPackages                             laravelarab/tarjama - 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. laravelarab/tarjama

Abandoned → [fevrok/laravel-translatable](/?search=fevrok%2Flaravel-translatable)ArchivedLibrary[Database &amp; ORM](/categories/database)

laravelarab/tarjama
===================

It's a laravel model columns translation manager

v1.8.0(5y ago)23621MITPHPPHP ^5.6.4|^7.0|^8.0

Since Oct 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/LaravelArab/tarjama)[ Packagist](https://packagist.org/packages/laravelarab/tarjama)[ Docs](https://github.com/LaravelArab/tarjama)[ RSS](/packages/laravelarab-tarjama/feed)WikiDiscussions 1.x Synced today

READMEChangelog (1)Dependencies (3)Versions (16)Used By (0)

> this package is deprecated please use:

tarjama
=======

[](#tarjama)

It's a Laravel model columns translation manager

Current working model
---------------------

[](#current-working-model)

[![Laravel Tarjama current working model](/images/current_working_model.png)](/images/current_working_model.png)

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

[](#installation)

You can install the package via composer:

```
composer require laravelarab/tarjama
```

If you have Laravel 5.5 and up The package will automatically register itself.

else you have to add the service provider to app/config/app.php

```
LaravelArab\Tarjama\TarjamaServiceProvider::class,
```

If you want to change the default locale, you must publish the config file:

```
php artisan vendor:publish --provider="LaravelArab\Tarjama\TarjamaServiceProvider"
```

This is the contents of the published file:

```
return [

   /**
    * Default Locale || Root columns locale
    * We will use this locale if config('app.locale') translation not exist
    */
   'locale' => 'en',

   /**
    * Supported Locales e.g: ['en', 'fr', 'ar']
    */
   'locales' => ['ar', 'en', 'fr']

];
```

next migrate translations table

```
php artisan migrate
```

Making a model translatable
---------------------------

[](#making-a-model-translatable)

The required steps to make a model translatable are:

- Just use the `LaravelArab\Tarjama\Translatable` trait.

Here's an example of a prepared model:

```
use Illuminate\Database\Eloquent\Model;
use LaravelArab\Tarjama\Translatable;

class Item extends Model
{
    use Translatable;

    /**
      * The attributes that are Translatable.
      *
      * @var array
      */
    protected $translatable = [
        'name', 'color'
    ];
}
```

### Available methods

[](#available-methods)

Saving translations

```
$item = new Item;
$data = array('en' => 'car', 'ar' => 'سيارة');

$item->setTranslations('name', $data); // setTranslations($attribute, array $translations, $save = false)

// or save one translation
$item->setTranslation('name', 'en', 'car', true); // setTranslation($attribute, $locale, $value, $save = false)

// or just do
$item->name = 'car'; // note: this will save automaticaly unless it's the default locale

// This will save if (current locale == default locale OR $save = false)
$item->save();
```

Get translations

```
$item = new Item::first();
// get current locale translation
$item->city
OR
$item->getTranslation('city');

// pass translation locales
$item->getTranslation('city', 'ar'); // getTranslation($attribute, $language = null, $fallback = true)
$item->getTranslationsOf('name', ['ar', 'en']); // getTranslationsOf($attribute, array $languages = null, $fallback = true)
```

Delete translations

```
$item = new Item::first();
$item->deleteTranslations(['name', 'color'], ['ar', 'en']); // deleteTranslations(array $attributes, $locales = null)
```

Maintainers
-----------

[](#maintainers)

    [ ![](https://github.com/chadidi.png?v=3&s=150)
 Abdellah Chadidi ](https://github.com/chadidi)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity76

Established project with proven stability

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

Recently: every ~45 days

Total

16

Last Release

1965d ago

Major Versions

v0.5.1 → v1.6.02017-12-27

PHP version history (4 changes)v0.3.0PHP &gt;=5.4.0

v1.6.2PHP &gt;=5.6.4

v1.7.0PHP ^5.6.4|^7.0

v1.8.0PHP ^5.6.4|^7.0|^8.0

### Community

Maintainers

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

---

Top Contributors

[![chadidi](https://avatars.githubusercontent.com/u/9916806?v=4)](https://github.com/chadidi "chadidi (64 commits)")

---

Tags

databaselaravellaravel-packagephptranslatabletranslationtranslationstranslatorlaraveltranslatetranslationmodeleloquentmultilinguali8nlaravel-packagetarjama

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravelarab-tarjama/health.svg)

```
[![Health](https://phpackages.com/badges/laravelarab-tarjama/health.svg)](https://phpackages.com/packages/laravelarab-tarjama)
```

###  Alternatives

[spatie/laravel-translatable

A trait to make an Eloquent model hold translations

2.4k23.0M413](/packages/spatie-laravel-translatable)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[ymigval/laravel-model-cache

Laravel package for caching Eloquent model queries

7642.2k3](/packages/ymigval-laravel-model-cache)[richan-fongdasen/laravel-i18n

Simple route and eloquent localization / translation in Laravel

1296.6k](/packages/richan-fongdasen-laravel-i18n)

PHPackages © 2026

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