PHPackages                             brotzka/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. [Localization &amp; i18n](/categories/localization)
4. /
5. brotzka/laravel-translation-manager

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

brotzka/laravel-translation-manager
===================================

Lets you manage your Laravel-translation files via database.

v1.1.0(8y ago)4681MITPHP

Since Feb 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Brotzka/Laravel-Translation-Manager)[ Packagist](https://packagist.org/packages/brotzka/laravel-translation-manager)[ RSS](/packages/brotzka-laravel-translation-manager/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)DependenciesVersions (7)Used By (1)

[![Codacy Badge](https://camo.githubusercontent.com/3138f695515a76e0401721f1d4243a1040bbff0be177a3772218aecab7c208a6/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6537393036373861393965343431363838616261303663373338343662316538)](https://app.codacy.com/app/fabianhagen87/Laravel-Translation-Manager?utm_source=github.com&utm_medium=referral&utm_content=Brotzka/Laravel-Translation-Manager&utm_campaign=badger)[![Latest Stable Version](https://camo.githubusercontent.com/ec61d374bbfb0fb0ec4f62898bd1b599f4f3dc72a8311aee46bd533a72c99bfb/68747470733a2f2f706f7365722e707567782e6f72672f62726f747a6b612f4c61726176656c2d5472616e736c6174696f6e2d4d616e616765722f762f737461626c65)](https://packagist.org/packages/brotzka/Laravel-Translation-Manager)[![Total Downloads](https://camo.githubusercontent.com/f73588473448e873be642d3098ff4c2ed58a3e921d902f3c7999b766c9b99407/68747470733a2f2f706f7365722e707567782e6f72672f62726f747a6b612f4c61726176656c2d5472616e736c6174696f6e2d4d616e616765722f646f776e6c6f616473)](https://packagist.org/packages/brotzka/laravel-translation-manager)[![Latest Unstable Version](https://camo.githubusercontent.com/1a80ee3fd6823232b5e88ce941c0cd15285e1a81d3a1d89df51a61e6ea25efc9/68747470733a2f2f706f7365722e707567782e6f72672f62726f747a6b612f4c61726176656c2d5472616e736c6174696f6e2d4d616e616765722f762f756e737461626c65)](https://packagist.org/packages/brotzka/laravel-translation-manager)[![License](https://camo.githubusercontent.com/64a7858bfeba2191301cab373dabbd429d40d7035f4f7bf0eb5d18a756d9fef5/68747470733a2f2f706f7365722e707567782e6f72672f62726f747a6b612f4c61726176656c2d5472616e736c6174696f6e2d4d616e616765722f6c6963656e7365)](https://packagist.org/packages/brotzka/laravel-translation-manager)

Laravel Translation Manager
===========================

[](#laravel-translation-manager)

This package provides an easy way to manage your translations in a database. It takes all files from your default locale folder (e.g. `resources/lang/de`) and creates translation-groups (e.g. `auth.php` becomes translation-group `auth`) which are stored in `translation_groups`-table. Then every entry from each file will be saved to the `translations`-table (yes, it takes care of multidimensional arrays of every depth).

After you have finished translating, the package writes all entries back to the resource-folder. All entries will be kept in database, so you can keep translating.

Updates are handled one-way. That means that changes which are made to a file will not replace the value in the database. The other way round, the complete content of a translation-file will be replaced by the values from the database.

Pros:
-----

[](#pros)

- Laravels default translation-loader will not be replaced, so everything keeps working
- Works with every Laravel version (5.\*)
- To add a new language, simply add it to your `config/app.php` and re-run `php artisan translations:toDatabse`, make your translations and run `php artisan translations:toFile`
- No more database exports! Develop locally without using the export function. Simply use your default language.

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

[](#installation)

- require via composer `composer require brotzka/translation-manager`
- add list of available languages to your `config/app.php`:

```
'available_locales' => ['de', 'en', 'sv'],

```

- run migration `php artisan migrate`

Commands
--------

[](#commands)

### translations:toDatabase

[](#translationstodatabase)

Call via:

```
php artisan translations:toDatabase

```

Collects all files and entries from within your `resources/lang/` folder and generates translations-groups and translations and writes them to the database. Existing files will NOT be updated.

### translations:toFile

[](#translationstofile)

Call via:

```
php artisan translations:toFile

```

Takes all entries from the database, generates missing language folders and translation-group files and puts the values to the files.

***NOTE***: If you want to call the commands via `Artisan::call('translations.toDatabase')`, you have to register both commands in `app/Console/Kernel.php`:

```
protected $commands = [
    // ..  other commands
    \Brotzka\TranslationManager\Module\Console\Commands\TranslationToDatabase::class,
    \Brotzka\TranslationManager\Module\Console\Commands\TranslationToFile::class,
];

```

Usage
-----

[](#usage)

In the back, this package creates two more models (`TranslationGroup` and `Translation`) tables (`translation_groups` and `translations`).

You can use them as you are used to use models in Laravel. The relevant namespace is: `Brotzka\TranslationManager\Module`.

You can query relationships like this:

- `$translation->getParent`: returns the parent-instance if existing (NULL if not)
- `$translation->children`: returns all children-instances
- `$translation->getGroup`: returns the translation-group of the current translation
- `$translationGroup->entries`: returns all entries belonging to the current translation-group

Future-Plans
------------

[](#future-plans)

- handle JSON-files
- provide some GUI-elements (e.g. language-switcher, translation-manager)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 94.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.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

3061d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9106911?v=4)[Fabian Hagen](/maintainers/Brotzka)[@Brotzka](https://github.com/Brotzka)

---

Top Contributors

[![Brotzka](https://avatars.githubusercontent.com/u/9106911?v=4)](https://github.com/Brotzka "Brotzka (17 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")

---

Tags

laravellaravel-5-packagelaravel-frameworklocalisation-manager

### Embed Badge

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

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

###  Alternatives

[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.

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

labels translated to spanish

166.8k](/packages/laradevs-spanish)

PHPackages © 2026

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