PHPackages                             txandy/laravel-translation-manager - 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. txandy/laravel-translation-manager

ActiveLibrary

txandy/laravel-translation-manager
==================================

Manage Laravel Translations

v0.2.1(10y ago)127MITPHPPHP &gt;=5.4.0

Since Jun 1Pushed 10y ago2 watchersCompare

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

READMEChangelogDependencies (3)Versions (9)Used By (0)

Laravel 5 Translation Manager
-----------------------------

[](#laravel-5-translation-manager)

### For Laravel 4, please use the [0.1 branch](https://github.com/barryvdh/laravel-translation-manager/tree/0.1)!

[](#for-laravel-4-please-use-the-01-branch)

This is a package to manage Laravel translation files. It does not replace the Translation system, only import/export the php files to a database and make them editable through a webinterface. The workflow would be:

```
- Import translations: Read all translation files and save them in the database
- Find all translations in php/twig sources
- Optionally: Listen to missing translation with the custom Translator
- Translate all keys through the webinterface
- Export: Write all translations back to the translation files.

```

This way, translations can be saved in git history and no overhead is introduced in production.

[![Screenshot](https://camo.githubusercontent.com/9837810bffea25c3d6854c960cbcbe9228631439c51f9ba4304c575e0c59ed88/687474703a2f2f692e696d6775722e636f6d2f347468326b72662e706e67)](https://camo.githubusercontent.com/9837810bffea25c3d6854c960cbcbe9228631439c51f9ba4304c575e0c59ed88/687474703a2f2f692e696d6775722e636f6d2f347468326b72662e706e67)

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

[](#installation)

Require this package in your composer.json and run composer update (or run `composer require barryvdh/laravel-translation-manager` directly):

```
"barryvdh/laravel-translation-manager": "0.2.x@dev"

```

After updating composer, add the ServiceProvider to the providers array in config/app.php

```
'Barryvdh\TranslationManager\ManagerServiceProvider',

```

You need to run the migrations for this package.

```
$ php artisan vendor:publish --provider="Barryvdh\TranslationManager\ManagerServiceProvider" --tag=migrations
$ php artisan migrate

```

You need to publish the config file for this package. This will add the file `config/translation-manager.php`, where you can configure this package.

```
$ php artisan vendor:publish --provider="Barryvdh\TranslationManager\ManagerServiceProvider" --tag=config

```

Routes are added in the ServiceProvider. You can set the group parameters for the routes in the configuration. You can change the prefix or filter/middleware for the routes. If you want full customisation, you can extend the ServiceProvider and override the `map()` function.

This example will make the translation manager available at `http://yourdomain.com/translations`

Usage
-----

[](#usage)

### Web interface

[](#web-interface)

When you have imported your translation (via buttons or command), you can view them in the webinterface (on the url you defined the with the controller). You can click on a translation and an edit field will popup. Just click save and it is saved :) When a translation is not yet created in a different locale, you can also just edit it to create it.

Using the buttons on the webinterface, you can import/export the translations. For publishing translations, make sure your application can write to the language directory.

You can also use the commands below.

### Import command

[](#import-command)

The import command will search through app/lang and load all strings in the database, so you can easily manage them.

```
$ php artisan translations:import

```

Note: By default, only new strings are added. Translations already in the DB are kept the same. If you want to replace all values with the ones from the files, add the `--replace` (or `-R`) option: `php artisan translations:import --replace`

### Find translations in source

[](#find-translations-in-source)

The Find command/button will look search for all php/twig files in the app directory, to see if they contain translation functions, and will try to extract the group/item names. The found keys will be added to the database, so they can be easily translated. This can be done through the webinterface, or via an Artisan command.

```
$ php artisan translations:find

```

### Export command

[](#export-command)

The export command will write the contents of the database back to app/lang php files. This will overwrite existing translations and remove all comments, so make sure to backup your data before using. Supply the group name to define which groups you want to publish.

```
$ php artisan translations:export

```

For example, `php artisan translations:export reminders` when you have 2 locales (en/nl), will write to `app/lang/en/reminders.php` and `app/lang/nl/reminders.php`

### Clean command

[](#clean-command)

The clean command will search for all translation that are NULL and delete them, so your interface is a bit cleaner. Note: empty translations are never exported.

```
$ php artisan translations:clean

```

### Reset command

[](#reset-command)

The reset command simply clears all translation in the database, so you can start fresh (by a new import). Make sure to export your work if needed before doing this.

```
$ php artisan translations:reset

```

### Detect missing translations

[](#detect-missing-translations)

Most translations can be found by using the Find command (see above), but in case you have dynamic keys (variables/automatic forms etc), it can be helpful to 'listen' to the missing translations. To detect missing translations, we can swap the Laravel TranslationServicepProvider with a custom provider. In your config/app.php, comment out the original TranslationServiceProvider and add the one from this package:

```
//'Illuminate\Translation\TranslationServiceProvider',
'Barryvdh\TranslationManager\TranslationServiceProvider',

```

This will extend the Translator and will create a new database entry, whenever a key is not found, so you have to visit the pages that use them. This way it shows up in the webinterface and can be edited and later exported. You shouldn't use this in production, just in production to translate your views, then just switch back.

TODO
----

[](#todo)

This package is still very alpha. Few thinks that are on the todo-list:

```
- Add locales/groups via webinterface
- Improve webinterface (more selection/filtering, behavior of popup after save etc)
- Seed existing languages (https://github.com/caouecs/Laravel4-lang)
- Suggestions are welcome :)

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.8% 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 ~54 days

Recently: every ~4 days

Total

8

Last Release

3983d ago

PHP version history (2 changes)v0.1.0PHP &gt;=5.3.0

v0.1.3PHP &gt;=5.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/752198?v=4)[Christian Jiménez](/maintainers/Txandy)[@txandy](https://github.com/txandy)

---

Top Contributors

[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (68 commits)")[![txandy](https://avatars.githubusercontent.com/u/752198?v=4)](https://github.com/txandy "txandy (14 commits)")[![letrunghieu](https://avatars.githubusercontent.com/u/1145335?v=4)](https://github.com/letrunghieu "letrunghieu (9 commits)")[![cossou](https://avatars.githubusercontent.com/u/1337112?v=4)](https://github.com/cossou "cossou (7 commits)")[![laurentvd](https://avatars.githubusercontent.com/u/408083?v=4)](https://github.com/laurentvd "laurentvd (1 commits)")[![irazasyed](https://avatars.githubusercontent.com/u/1915268?v=4)](https://github.com/irazasyed "irazasyed (1 commits)")[![spiroski](https://avatars.githubusercontent.com/u/2043833?v=4)](https://github.com/spiroski "spiroski (1 commits)")[![stevenyangecho](https://avatars.githubusercontent.com/u/5569554?v=4)](https://github.com/stevenyangecho "stevenyangecho (1 commits)")[![thylo](https://avatars.githubusercontent.com/u/1242863?v=4)](https://github.com/thylo "thylo (1 commits)")[![laszlokis-lynx](https://avatars.githubusercontent.com/u/258006090?v=4)](https://github.com/laszlokis-lynx "laszlokis-lynx (1 commits)")[![UnrulyNatives](https://avatars.githubusercontent.com/u/6769986?v=4)](https://github.com/UnrulyNatives "UnrulyNatives (1 commits)")

---

Tags

laraveltranslationstranslator

### Embed Badge

![Health badge](/badges/txandy-laravel-translation-manager/health.svg)

```
[![Health](https://phpackages.com/badges/txandy-laravel-translation-manager/health.svg)](https://phpackages.com/packages/txandy-laravel-translation-manager)
```

###  Alternatives

[barryvdh/laravel-translation-manager

Manage Laravel Translations

1.7k3.6M17](/packages/barryvdh-laravel-translation-manager)[kkomelin/laravel-translatable-string-exporter

Translatable String Exporter for Laravel

3291.4M10](/packages/kkomelin-laravel-translatable-string-exporter)[highsolutions/laravel-translation-manager

Manage Laravel Translations

1518.8k](/packages/highsolutions-laravel-translation-manager)

PHPackages © 2026

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