PHPackages                             anekdotes/polyglot - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. anekdotes/polyglot

ActiveLibrary[Localization &amp; i18n](/categories/localization)

anekdotes/polyglot
==================

Abstract model that eases the localization of Illuminate model.

1.1.1(9y ago)038MITPHPPHP &gt;=5.6.0

Since Oct 11Pushed 9y ago3 watchersCompare

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

READMEChangelogDependenciesVersions (4)Used By (0)

Anekdotes Polyglot
==================

[](#anekdotes-polyglot)

[![Latest Stable Version](https://camo.githubusercontent.com/331c131c798fe4cf1541c98fd0728709ce8fee396f461b5f8817c35dc0563404/68747470733a2f2f706f7365722e707567782e6f72672f616e656b646f7465732f706f6c79676c6f742f762f737461626c65)](https://packagist.org/packages/anekdotes/polyglot)[![Build Status](https://camo.githubusercontent.com/559cd13098e9c37911ef4717830ad91c0fba30d122d3dc882c5f246fa75f1e30/68747470733a2f2f7472617669732d63692e6f72672f616e656b646f7465732f706f6c79676c6f742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/anekdotes/polyglot)[![codecov.io](https://camo.githubusercontent.com/4f00ad2aab5bc3a9074a4094f29d8214dc64139587ddb4fbc02ab82ffe1caf0b/68747470733a2f2f636f6465636f762e696f2f67682f616e656b646f7465732f706f6c79676c6f742f636f7665726167652e737667)](https://codecov.io/gh/anekdotes/polyglot?branch=master)[![StyleCI](https://camo.githubusercontent.com/edf4f87056e15f8ef45eef03588ecd85e6be89309bb4819332532b483f9e1a9f/68747470733a2f2f7374796c6563692e696f2f7265706f732f36333630303338392f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/63600389)[![License](https://camo.githubusercontent.com/2970d5c1e158b68dc025470567d8ee5f458c6bf5511ba29a2992080293aebf4b/68747470733a2f2f706f7365722e707567782e6f72672f616e656b646f7465732f706f6c79676c6f742f6c6963656e7365)](https://packagist.org/packages/anekdotes/polyglot)[![Total Downloads](https://camo.githubusercontent.com/6c0ec093ed488529bd08f322892547104b34e26a78f634fb676f878ca95e1f46/68747470733a2f2f706f7365722e707567782e6f72672f616e656b646f7465732f706f6c79676c6f742f646f776e6c6f616473)](https://packagist.org/packages/anekdotes/polyglot)

Abstract model that eases the localization of Illuminate model.

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

[](#installation)

Install via composer into your project:

```
composer require anekdotes/polyglot

```

Usage
-----

[](#usage)

Extends the model you wish to translate with the class

```
class Test extends TranslatedModel
```

Add the desired translated columns to the polyglot array (locale has to be there)

```
protected $polyglot = ['locale', 'title', 'description', 'slug'];
```

Don't forget to also add the translated columns to the fillable array

```
protected $fillable = ['rank', 'locale', 'title', 'description', 'slug'];
```

Make a new file preferably Lang.php and extends Illuminate Model

```
class TestLang extends Model
```

Add the translated columns to the fillable array and set timestamps to false

```
protected $fillable = ['locale', 'title', 'description', 'slug'];

public $timestamps = false;
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

3500d ago

### Community

---

Top Contributors

[![franatieu](https://avatars.githubusercontent.com/u/4522233?v=4)](https://github.com/franatieu "franatieu (21 commits)")

### Embed Badge

![Health badge](/badges/anekdotes-polyglot/health.svg)

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

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

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