PHPackages                             adlanarifzr/translatr - 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. adlanarifzr/translatr

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

adlanarifzr/translatr
=====================

A simple trait to translate data from database through Laravel model

v0.0.1(8y ago)444MITPHP

Since Jan 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/adlanarifzr/translatr)[ Packagist](https://packagist.org/packages/adlanarifzr/translatr)[ RSS](/packages/adlanarifzr-translatr/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Table of Contents
--------------------------------------------------------------

[](#table-of-contents)

- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Support &amp; Thanks](#support)
- [License]($license)

Introduction
============

[](#introduction)

To display a translated static text might be easy with Laravel, yet to display a translated data from database/model would usually require a little bit of efforts and lines of code. Translatr helps to simplify the translation concept by integrating a simple trait into the Models without having to have extra tables and such.

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

[](#installation)

1. Install the package through composer

```
composer require adlanarifzr/translatr

```

2. Use the Translatr in your Model

```
use Translatr\Translatr;

class ModelName extends Model
{
    use Translatr;
}
```

Usage
-----

[](#usage)

You can translate any data in your database by adding column name with `_locale` at the end of the column/attribute name. For example `description_en` for English and `description_my` for Malay language.

```
echo $model->description;
```

This command will display the description based on your current locale. To add more language, simply add new column with different locale.

Support &amp; Thanks
-------------------------------------------------------

[](#support--thanks)

I would be really grateful if you would contribute to support my development in Laravel packages. I can be reached at .

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3046d ago

### Community

Maintainers

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

---

Top Contributors

[![adlanarifzr](https://avatars.githubusercontent.com/u/30769424?v=4)](https://github.com/adlanarifzr "adlanarifzr (11 commits)")

### Embed Badge

![Health badge](/badges/adlanarifzr-translatr/health.svg)

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

###  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)
