PHPackages                             riseno/localizable - 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. riseno/localizable

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

riseno/localizable
==================

The localization plugin for laravel framework

v1.1.1(10y ago)11.4kMITPHPPHP &gt;=5.4.0

Since Dec 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/risenohk/localizable)[ Packagist](https://packagist.org/packages/riseno/localizable)[ RSS](/packages/riseno-localizable/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (5)Versions (8)Used By (0)

Laravel Localizable
-------------------

[](#laravel-localizable)

[![Latest Stable Version](https://camo.githubusercontent.com/5b6d3cb66fac346339cd9ab2ea6ec542b46ca81bf2a16ac32e5c5b11c8fb8cc4/68747470733a2f2f706f7365722e707567782e6f72672f726973656e6f2f6c6f63616c697a61626c652f762f737461626c65)](https://packagist.org/packages/riseno/localizable) [![Total Downloads](https://camo.githubusercontent.com/fc7d38fbc55981cf7732e9b2fa956545827e3547a6dee549a955043a3a629fc2/68747470733a2f2f706f7365722e707567782e6f72672f726973656e6f2f6c6f63616c697a61626c652f646f776e6c6f616473)](https://packagist.org/packages/riseno/localizable) [![License](https://camo.githubusercontent.com/d098cece403cd1244d635bdb077c556e9b27011cab200051a448b64072093aea/68747470733a2f2f706f7365722e707567782e6f72672f726973656e6f2f6c6f63616c697a61626c652f6c6963656e7365)](https://packagist.org/packages/riseno/localizable)

A small plugin for managing multi-language in database table.

### Installation

[](#installation)

Require this package with composer using the following command:

```
composer require riseno/localizable
```

After updating composer, add the service provider to the `providers` array in `config/app.php`

```
Riseno\Localizable\LocalizableServiceProvider::class,
```

Run artisan command to generate the database migration file

```
php artisan riseno:localizable:generate user
```

After generated migration file, open the migration file. Add any column that should be localized.

```
Schema::create('user_localizations', function(Blueprint $table)
{
	$table->increments('id');
	$table->unsignedInteger('user_id');
	$table->string('locale');
	$table->boolean('default')->default(false);
	$table->string('name')->nullable();
	$table->timestamps();
	$table->foreign('user_id')->references('id')->on('users');
});
```

Once all the columns is added to migration file, run migrate command

```
php artisan migrate
```

Go to the model that you want to implement localizable function, and add this trait to the class

```
use Riseno\Localizable\LocalizableTrait;

class User extends Authenticatable
{
    use LocalizableTrait;
```

And also two required properties

```
protected $localizeModel  = UserLocalizations::class;
protected $localizeFields = ['name'];
```

One more thing, add a localizations method

```
public function localizations()
{
    return $this->hasMany(UserLocalizations::class, 'user_id', 'id');
}
```

### Usage

[](#usage)

The trait has provided a generic method for accessing the localized data,

```
$user->localize('en_US');
// or access value directly
$user->localize('en_US')->name;
```

If you want to save / update the localized record

```
$user->saveLocalize('en_US', ['name' => 'Riseno']);
```

### License

[](#license)

The Laravel Localizable is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~0 days

Total

6

Last Release

3745d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f30f76d49fb040db0fc8434d643d30a9423f60edf6fa6a5f1d04275020fe8576?d=identicon)[ryanchan.tc](/maintainers/ryanchan.tc)

---

Tags

laravellocalizationlanguageeloquentmulti

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/riseno-localizable/health.svg)

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

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[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)[baril/bonsai

An implementation of the Closure Tables pattern for Eloquent.

3593.5k](/packages/baril-bonsai)[rinvex/laravel-tenants

Rinvex Tenants is a contextually intelligent polymorphic Laravel package, for single db multi-tenancy. You can completely isolate tenants data with ease using the same database, with full power and control over what data to be centrally shared, and what to be tenant related and therefore isolated from others.

823.5k10](/packages/rinvex-laravel-tenants)

PHPackages © 2026

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