PHPackages                             stepovenko/laravel-chained-translator - 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. stepovenko/laravel-chained-translator

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

stepovenko/laravel-chained-translator
=====================================

The Laravel Chained Translator can combine several translators that can override each others translations.

1.3.2(4y ago)023MITPHPPHP &gt;=7.2.0

Since Dec 18Pushed 4y agoCompare

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

READMEChangelogDependencies (2)Versions (8)Used By (0)

Laravel Chained Translator
==========================

[](#laravel-chained-translator)

The chained translator can combine several translators that can override each others translations. Typically, at some point during the development phase, a content manager wants to translate or finetune the translation strings added by developers. This often results in merge and versioning issues, when developers and content managers are working on the translation files at the same time.

The Chained Translator package allows translations created by developers to exist separately from translations edited by the content manager in separate `lang` directories. The library merges the translations of both language directories, where the translations of the content manager (the custom translations) override those of the developer (the default translations).

For instance, the default translations created by developers are written in the default Laravel `lang` directory in `resources/lang`, and the translations by the content manager are added to `resources/lang-custom`. When a translation key exists in the `resources/lang-custom` directory, this is preferred, otherwise we fallback to the default translations.

The package works together with our [Laravel Nova Chained Translation Manager](https://github.com/statikbe/laravel-nova-chained-translation-manager) that provides a UI to let content managers edit translations.

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

[](#installation)

Via composer:

```
composer require statikbe/laravel-chained-translator

```

Commands
--------

[](#commands)

### Merge the custom translations back into the default translation files

[](#merge-the-custom-translations-back-into-the-default-translation-files)

If you want to combine the translation files made in the current environment by the content manager with the default translation files, you can use the following command. You need to pass the locale as a parameter, since this library is agnostic of the locales supported by your Laravel application. Laravel sadly does not have a default supported locales list. So if you want to merge all files for all supported locales, run this command for each locale.

For example, for French:

```
php artisan chainedtranslator:merge fr
```

This command can be useful to merge the translation work of a translator back into the default translation files.

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

[](#configuration)

You can publish the configuration by running this command:

```
php artisan vendor:publish --provider="Statikbe\LaravelChainedTranslator\TranslationServiceProvider"

```

The following configuration fields are available:

- **Custom lang directory**: By default, the custom translations are saved in `resources/lang-custom`. This can be configured in `laravel-chained-translator.php` configuration file with the key: `custom_lang_directory_name`
- **Add .gitignore to custom lang directory**: If the config key `add_gitignore_to_custom_lang_directory` is set to true, a .gitignore file is added to the custom language directory.

TODO's &amp; Ideas
------------------

[](#todos--ideas)

- support for JSON translation files
- option to overwrite the default `lang` directory. This could be useful on local and staging environments to manage the developer translations.

Credits
-------

[](#credits)

We used [Joe Dixon's](https://github.com/joedixon) translation libraries as a source of technical expertise and inspiration:

- [Laravel Translation](https://github.com/joedixon/laravel-translation)

Thanks a lot for the great work!

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% 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 ~52 days

Total

6

Last Release

1706d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/413b77df97d5fabf7abb91a5f5d823ebb90b53fca707a194917f4a045ba630f3?d=identicon)[Stepovenko](/maintainers/Stepovenko)

---

Top Contributors

[![sten](https://avatars.githubusercontent.com/u/180665?v=4)](https://github.com/sten "sten (15 commits)")[![stepovenko](https://avatars.githubusercontent.com/u/33463554?v=4)](https://github.com/stepovenko "stepovenko (5 commits)")[![dllobell](https://avatars.githubusercontent.com/u/49846756?v=4)](https://github.com/dllobell "dllobell (4 commits)")

---

Tags

laraveltranslationsChaincustomcustomercontent managerchainedstatikbestatik

### Embed Badge

![Health badge](/badges/stepovenko-laravel-chained-translator/health.svg)

```
[![Health](https://phpackages.com/badges/stepovenko-laravel-chained-translator/health.svg)](https://phpackages.com/packages/stepovenko-laravel-chained-translator)
```

###  Alternatives

[statikbe/laravel-chained-translator

The Laravel Chained Translator can combine several translators that can override each others translations.

36149.4k6](/packages/statikbe-laravel-chained-translator)[vemcogroup/laravel-translation

Translation package for Laravel to scan for localisations and up/download to poeditor

135304.0k2](/packages/vemcogroup-laravel-translation)[genl/matice

Use your Laravel translations in JavaScript. Generates a Blade directive exporting all of your Laravel translations and provides a nice trans() helper function in JavaScript.

101339.4k2](/packages/genl-matice)[vildanbina/laravel-auto-translation

A Laravel package for automating the translation of language files.

9220.5k2](/packages/vildanbina-laravel-auto-translation)[cactus-galaxy/filament-astrotomic

Filament support for Astrotomic's Laravel Translatable package.

2516.3k](/packages/cactus-galaxy-filament-astrotomic)[square-bit/laravel-pt-localization

Portuguese Localization package for Laravel

113.6k](/packages/square-bit-laravel-pt-localization)

PHPackages © 2026

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