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 4w 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 57% 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

3790d 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

[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[prettus/l5-repository

Laravel 8|9|10|11|12|13 - Repositories to the database layer

4.2k11.2M154](/packages/prettus-l5-repository)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k5.0M31](/packages/tucker-eric-eloquentfilter)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4821.5k](/packages/erag-laravel-lang-sync-inertia)[toponepercent/baum

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

3159.7k2](/packages/toponepercent-baum)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

442.1k](/packages/itpathsolutions-dbstan)

PHPackages © 2026

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