PHPackages                             larapages/translations - 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. larapages/translations

Abandoned → [nickdekruijk/translations](/?search=nickdekruijk%2Ftranslations)Library[Localization &amp; i18n](/categories/localization)

larapages/translations
======================

A simple Translation trait to be used with Laravel Models

3.0.4(1y ago)115MITPHPPHP &gt;=7.2.5CI failing

Since Jun 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nickdekruijk/translations)[ Packagist](https://packagist.org/packages/larapages/translations)[ Docs](http://www.nickdekruijk.nl)[ RSS](/packages/larapages-translations/feed)WikiDiscussions master Synced today

READMEChangelog (9)Dependencies (1)Versions (12)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/15e3d2d21430e80531deec1b2ed9c8e752aa8dd337c2dc05a69e810af22ba24e/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f7472616e736c6174696f6e732f762f737461626c65)](https://packagist.org/packages/nickdekruijk/translations)[![Latest Unstable Version](https://camo.githubusercontent.com/62c6c6d5d552039736d2eb84771173852e3c166d73717fd089b972c7f9954f16/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f7472616e736c6174696f6e732f762f756e737461626c65)](https://packagist.org/packages/nickdekruijk/translations)[![Monthly Downloads](https://camo.githubusercontent.com/551ee2619b60d8ac9dc63cce4943999ea9db4f1f95466e9e27f372e8894111a0/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f7472616e736c6174696f6e732f642f6d6f6e74686c79)](https://packagist.org/packages/nickdekruijk/translations)[![Total Downloads](https://camo.githubusercontent.com/bd9c42aca96495d68945c1636bfa4e66702af9ea593658f777c1ea7b3e114245/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f7472616e736c6174696f6e732f646f776e6c6f616473)](https://packagist.org/packages/nickdekruijk/translations)[![License](https://camo.githubusercontent.com/77815f6422dffa367f9b6a684e4459488dfb22fbad67534e8d90885085a8c6ec/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f7472616e736c6174696f6e732f6c6963656e7365)](https://packagist.org/packages/nickdekruijk/translations)

Translations
============

[](#translations)

A simple Translation trait to be used with Laravel Models. When this trait is enabled on your model you can user $model-&gt;\_\_('column') or $model-&gt;trans('column') to get the translated value for your current locale.

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

[](#installation)

To install the package use

`composer require nickdekruijk/translations`

Configuration
-------------

[](#configuration)

If you don't like the default configuration options publish the config file and change the `translations.php` file in your Laravel `app/config` folder.

`php artisan vendor:publish --tag=config --provider="NickDeKruijk\Translations\ServiceProvider"`

Usage
-----

[](#usage)

First off all your database table must include all columns for the translations. For example if you have a table with a title and a description column you must add a title\_nl and description\_nl column if you want do support Dutch (nl) translations. Add this to the use section of your model: `use NickDeKruijk\Translations\Translations;`And add `use Translations;`after

```
class Story extends Model
{

```

Then you can use the trans or \_\_ methods on your models. Like this: `$story->trans('title')` or `$story->__('description')`

License
-------

[](#license)

Translations is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance46

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Recently: every ~338 days

Total

11

Last Release

419d ago

Major Versions

1.1.2 → 2.0.02021-04-20

2.1.0 → 3.0.02021-07-02

PHP version history (2 changes)1.0.0PHP &gt;=7.0.0

2.0.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b01fc7c2c39bbe8f87b4afa70ffe1cf2bb787310e1d22fcfed6ae527d4573bb?d=identicon)[nickdekruijk](/maintainers/nickdekruijk)

---

Top Contributors

[![nickdekruijk](https://avatars.githubusercontent.com/u/607302?v=4)](https://github.com/nickdekruijk "nickdekruijk (19 commits)")

---

Tags

phplaravellocalizationtranslationmodel

### Embed Badge

![Health badge](/badges/larapages-translations/health.svg)

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

###  Alternatives

[mcamara/laravel-localization

Easy localization for Laravel

3.5k9.1M112](/packages/mcamara-laravel-localization)[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

543638.1k4](/packages/codezero-laravel-localized-routes)[jayesh/laravel-gemini-translator

An interactive command to extract and generate Laravel translations using Gemini AI.

691.7k1](/packages/jayesh-laravel-gemini-translator)[opgginc/codezero-laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

2770.1k1](/packages/opgginc-codezero-laravel-localized-routes)[awes-io/localization-helper

Package for convenient work with Laravel's localization features

3527.1k4](/packages/awes-io-localization-helper)

PHPackages © 2026

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