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

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

bunta/translations
==================

Translation trait

09PHP

Since Aug 5Pushed 9y agoCompare

[ Source](https://github.com/aanyszek/translations)[ Packagist](https://packagist.org/packages/bunta/translations)[ RSS](/packages/bunta-translations/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

translations
============

[](#translations)

instalation
===========

[](#instalation)

add to "\\config\\app.php":
---------------------------

[](#add-to-configappphp)

```
'providers' => [
    ...
    Bunta\Translations\TranslationsServiceProvider::class
    ...
],

```

add to "\\app\\SomeModel.php":
------------------------------

[](#add-to-appsomemodelphp)

```
...
use \Bunta\Translations\TranslationsTrait;
...
public $translatedAttributes = ['nameVirtualAttributeToTranslate'];
...

```

run comands
-----------

[](#run-comands)

```
composer du
php artisan optimize
php artisan vendor:publish
php artisan migrate

```

Usage
=====

[](#usage)

Access to right translate
-------------------------

[](#access-to-right-translate)

```
$model->nameVirtualAttributeToTranslate;

```

Access to all translates
------------------------

[](#access-to-all-translates)

```
@foreach(Config::get('translations.locales') as $lang)
    {!! Form::text("nameVirtualAttributeToTranslate[$lang]",$model->translation('nameVirtualAttributeToTranslate',$lang)) !!}
@endforeach

```

save translate
--------------

[](#save-translate)

```
 Model::create($request->all());

```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20854683?v=4)[Artur Anyszek](/maintainers/aanyszek)[@aanyszek](https://github.com/aanyszek)

---

Top Contributors

[![aanyszek](https://avatars.githubusercontent.com/u/20854683?v=4)](https://github.com/aanyszek "aanyszek (5 commits)")

### Embed Badge

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

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

###  Alternatives

[php-translation/translator

Translator services

25224.8k5](/packages/php-translation-translator)[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1926.6k1](/packages/smmoosavi-php-gettext)[laradevs/spanish

labels translated to spanish

166.7k](/packages/laradevs-spanish)

PHPackages © 2026

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