PHPackages                             masteryuri/laravel-edit-trans - 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. masteryuri/laravel-edit-trans

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

masteryuri/laravel-edit-trans
=============================

Manage Laravel Translations

133PHP

Since Apr 11Pushed 10y ago1 watchersCompare

[ Source](https://github.com/MasterYuri/Laravel-EditTrans)[ Packagist](https://packagist.org/packages/masteryuri/laravel-edit-trans)[ RSS](/packages/masteryuri-laravel-edit-trans/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel-EditTrans Beta
======================

[](#laravel-edittrans-beta)

Component to manage localization files for projects based on Laravel 5 with rich editor support.

[![alt tag](https://camo.githubusercontent.com/72dc69a7f18a9eae88fce517461ba666479c1fb0812fb2f44a2c21e13cbb61ee/687474703a2f2f616d6265726d757365756d2e72752f75706c2f636b656469746f722f323031362d30342d30355f31392d35302d35382e706e67)](https://camo.githubusercontent.com/72dc69a7f18a9eae88fce517461ba666479c1fb0812fb2f44a2c21e13cbb61ee/687474703a2f2f616d6265726d757365756d2e72752f75706c2f636b656469746f722f323031362d30342d30355f31392d35302d35382e706e67)[![alt tag](https://camo.githubusercontent.com/94ca923bdfc17ffc824537955076a827e3bea451cfbb42f70e64be8cb94ee2ff/687474703a2f2f616d6265726d757365756d2e72752f75706c2f636b656469746f722f323031362d30342d30355f31392d35342d34312e706e67)](https://camo.githubusercontent.com/94ca923bdfc17ffc824537955076a827e3bea451cfbb42f70e64be8cb94ee2ff/687474703a2f2f616d6265726d757365756d2e72752f75706c2f636b656469746f722f323031362d30342d30355f31392d35342d34312e706e67)[![alt tag](https://camo.githubusercontent.com/ceb49a882e60ff5370431f4a6e1bf71ff3be76a449320f6b7479dba7e5d54704/687474703a2f2f616d6265726d757365756d2e72752f75706c2f636b656469746f722f323031362d30342d30355f31392d35382d31362e706e67)](https://camo.githubusercontent.com/ceb49a882e60ff5370431f4a6e1bf71ff3be76a449320f6b7479dba7e5d54704/687474703a2f2f616d6265726d757365756d2e72752f75706c2f636b656469746f722f323031362d30342d30355f31392d35382d31362e706e67)

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

[](#installation)

Via Composer

```
$ composer require masteryuri/laravel-edittrans
```

Add service provider into `/config/app.php`:

```
'MasterYuri\EditTrans\ServiceProvider',

```

Publish config and public resources:

```
php artisan vendor:publish --provider="MasterYuri\EditTrans\ServiceProvider"

```

Usage
-----

[](#usage)

Link to managment page is:

```
'/admin/edit_trans' // In case if config('admin-edit-trans.route.prefix') is equal to 'admin'

```

or action:

```
'MasterYuri\EditTrans\Controller@pageList'

```

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

[](#configuration)

Configuration file is 'admin-edit-trans.php'. It has comments that describe all parameters.

[Read configuration file](config/admin-edit-trans.php)

Artisan util
------------

[](#artisan-util)

Library has utilite that allows you to move strings from viewers to localization files. In most simple case you need just to wrap string into special tag:

```
{{--@@--}}Some title{{--@@--}}

```

And run command:

```
php artisan viewstolocales:run

```

It will replace text to:

```
@lang('home.some_title')

```

And create new localization files (or append to existing) for all existing locales.

### Options

[](#options)

With option `onlylocale` you can make it to generate only for one locale:

```
php artisan viewstolocales:run --onlylocale=en

```

Also in tag wrap tag you can declare name of variable and save path. For example:

We have viewer at `/resources/views/site/home.blade.php` and one string to move into localization file (Local path in views is '/site/home.blade.php'). Let's find out what we get after running `php artisan viewstolocales:run --onlylocale=en`:

### Example 1

[](#example-1)

Save original subdirectory and file name, generate var name based on var text.

Source string in viewer:

```
{{--@@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('site/home.some_title')

```

Final localization file path:

```
/resources/lang/en/site/home.php

```

Final content of localization:

```
return ["some_title" => "Some title"]

```

### Example 2

[](#example-2)

Save original subdirectory and file name, use custom var name.

Source string in viewer:

```
{{--@the_title@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('site/home.the_title')

```

Final localization file path:

```
/resources/lang/en/site/home.php

```

Final content of localization:

```
["the_title"  => "Some title"]

```

### Example 3

[](#example-3)

Same case.

Source string in viewer:

```
{{--@.the_title@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('site/home.the_title')

```

Final localization file path:

```
/resources/lang/en/site/home.php

```

Final content of localization:

```
["the_title"  => "Some title"]

```

### Example 4

[](#example-4)

Save original subdirectory and file name, use custom multil-level var name.

Source string in viewer:

```
{{--@.the_title.inner1.inner2@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('site/home.the_title.inner1.inner2')

```

Final localization file path:

```
/resources/lang/en/site/home.php

```

Final content of localization:

```
["the_title"  => ["inner1" => ["inner2" => ["Some title"]]]]

```

### Example 5

[](#example-5)

Put in localization file into root, save original file name, set custom var name.

Source string in viewer:

```
{{--@/.the_title@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('home.the_title')

```

Final localization file path:

```
/resources/lang/en/home.php

```

Final content of localization:

```
["the_title"  => "Some title"]

```

### Example 6

[](#example-6)

Save original subdirectory, set custom file name and set custom var name

Source string in viewer:

```
{{--@default.the_title@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('site/default.the_title')

```

Final localization file path:

```
/resources/lang/en/site/default.php

```

Final content of localization:

```
["the_title" => "Some title"]

```

### Example 7

[](#example-7)

Put in localization file into root, set custom file name and set custom var name.

Source string in viewer:

```
{{--@/default.the_title@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('site/default.the_title')

```

Final localization file path:

```
/resources/lang/en/site/default.php

```

Final content of localization:

```
["the_title" => "Some title"]

```

### Example 8

[](#example-8)

Set custom subdirectory name, set custom file name and set custom var name.

Source string in viewer:

```
{{--@the_site/default.the_title@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('the_site/default.the_title')

```

Final localization file path:

```
/resources/lang/en/the_site/default.php

```

Final content of localization:

```
["the_title" => "Some title"]

```

### Example 9

[](#example-9)

Set custom deep subdirectory name, set custom file name and set custom var name.

Source string in viewer:

```
{{--@the_site/the_site_subdir/default.the_title@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('the_site/the_site_subdir/default.the_title')

```

Final localization file path:

```
/resources/lang/en/the_site/the_site_subdir/default.php

```

Final content of localization:

```
["the_title" => "Some title"]

```

### Example 10

[](#example-10)

Set custom deep subdirectory name, set custom file name and set custom multi-level var name.

Source string in viewer:

```
{{--@the_site/the_site_subdir/default.the_title.inner1.inner2@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('the_site/the_site_subdir/default.the_title.inner1.inner2')

```

Final localization file path:

```
/resources/lang/en/the_site/the_site_subdir/default.php

```

Final content of localization:

```
["the_title"  => ["inner1" => ["inner2" => ["Some title"]]]]

```

### Example 11

[](#example-11)

Set custom deep subdirectory name, save original file name, set custom var name.

Source string in viewer:

```
{{--@the_site/the_site_subdir/.the_title@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('the_site/the_site_subdir/home.the_title')

```

Final localization file path:

```
/resources/lang/en/the_site/the_site_subdir/home.php

```

Final content of localization:

```
["the_title" => "Some title"]

```

### Example 12

[](#example-12)

Set custom deep subdirectory name, save original file name, set custom var name.

Source string in viewer:

```
{{--@the_site/the_site_subdir/.@--}}Some title{{--@@--}}

```

Final string in viwer:

```
@lang('the_site/the_site_subdir/home.the_title')

```

Final localization file path:

```
/resources/lang/en/the_site/the_site_subdir/home.php

```

Final content of localization:

```
["the_title" => "Some title"]

```

---

Also remember that you can wrap big peaces of text that contains html tags:

```
{{--@@--}}

  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
  labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
  nisi ut aliquip ex ea commodo consequat.

  Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium,
  totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae
  dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
  sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

{{--@@--}}
```

License
-------

[](#license)

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

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.4% 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://www.gravatar.com/avatar/f7aa4d6ae822754c3780f3ccbac02468064cbe31de4d31fda4fb99fb639fc71b?d=identicon)[MasterYuri](/maintainers/MasterYuri)

---

Top Contributors

[![MasterYuri](https://avatars.githubusercontent.com/u/16851673?v=4)](https://github.com/MasterYuri "MasterYuri (14 commits)")[![yuriyg86](https://avatars.githubusercontent.com/u/3150407?v=4)](https://github.com/yuriyg86 "yuriyg86 (3 commits)")

### Embed Badge

![Health badge](/badges/masteryuri-laravel-edit-trans/health.svg)

```
[![Health](https://phpackages.com/badges/masteryuri-laravel-edit-trans/health.svg)](https://phpackages.com/packages/masteryuri-laravel-edit-trans)
```

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