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

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

statikbe/laravel-chained-translator
===================================

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

2.6.0(2mo ago)37163.1k↓46.8%126MITPHPPHP ^8.1CI passing

Since Dec 18Pushed 2mo ago5 watchersCompare

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

READMEChangelog (10)Dependencies (8)Versions (18)Used By (6)

[![Laravel Chained Translator](documentation/img/banner-laravel-chained-translator.png)](documentation/img/banner-laravel-chained-translator.png)

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

[](#laravel-chained-translator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/974bb2a0b7eb7931287533b53be8870e7e6919212141a0fe2a9bf6aea12b9b89/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746174696b62652f6c61726176656c2d636861696e65642d7472616e736c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/statikbe/laravel-chained-translator)[![Total Downloads](https://camo.githubusercontent.com/772942cb87362dbbfc6d1abc6fb106e515fb55921ce8b5af765bb08aa34b863e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746174696b62652f6c61726176656c2d636861696e65642d7472616e736c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/statikbe/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.

We offer two package that provide a UI to let content managers edit translations.

- [Laravel Nova Chained Translation Manager](https://github.com/statikbe/laravel-nova-chained-translation-manager) for Laravel Nova
- [Laravel Filament Chained Translation Manager](https://github.com/statikbe/laravel-filament-chained-translation-manager) for Laravel Filament

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" --tag=config
```

### The following configuration fields are available:

[](#the-following-configuration-fields-are-available)

#### 1. Custom lang directory

[](#1-custom-lang-directory)

By default, the custom translations are saved in `resources/lang-custom`. This can be configured using `custom_lang_directory_name`.

#### 2. .gitignore in custom lang directory

[](#2-gitignore-in-custom-lang-directory)

If `add_gitignore_to_custom_lang_directory` is set to true, a .gitignore file is added to the custom language directory.

#### 3. Group keys in nested arrays

[](#3-group-keys-in-nested-arrays)

If `group_keys_in_array` is set to true, dotted translation keys will be mapped into arrays.

Set to **true**: saved as nested arrays, f.e.

```
'key' => [
   'detail' => 'translation',
]
```

Set to **false**: saved as dotted keys, f.e.

```
'key.detail' => 'translation',
```

#### 4. Custom json group name

[](#4-custom-json-group-name)

You can edit the group name of all json translations with the `json_group`.

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

60

—

FairBetter than 98% of packages

Maintenance85

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 50.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 ~138 days

Recently: every ~197 days

Total

15

Last Release

89d ago

Major Versions

1.3.2 → 2.0.02022-03-24

PHP version history (5 changes)1.0.0PHP &gt;=7.2.0

2.0.0PHP ^8.0|^8.1

2.2.0PHP ^8.0|^8.1|^8.2

2.5.0PHP ^8.0|^8.1|^8.2|^8.3|^8.4

2.6.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/1250437446b84017407f7f1900194b1e1c93fcf34b332ba382fb77f69b251cb6?d=identicon)[statikbe](/maintainers/statikbe)

---

Top Contributors

[![sten](https://avatars.githubusercontent.com/u/180665?v=4)](https://github.com/sten "sten (32 commits)")[![vanneszias](https://avatars.githubusercontent.com/u/178904621?v=4)](https://github.com/vanneszias "vanneszias (21 commits)")[![dllobell](https://avatars.githubusercontent.com/u/49846756?v=4)](https://github.com/dllobell "dllobell (4 commits)")[![kristofser](https://avatars.githubusercontent.com/u/5928907?v=4)](https://github.com/kristofser "kristofser (2 commits)")[![WoutDeBoeck](https://avatars.githubusercontent.com/u/45175495?v=4)](https://github.com/WoutDeBoeck "WoutDeBoeck (2 commits)")[![ziming](https://avatars.githubusercontent.com/u/679513?v=4)](https://github.com/ziming "ziming (2 commits)")

---

Tags

laravellaraveltranslationsChaincustomcustomercontent managerchainedstatikbestatik

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.4k](/packages/typicms-base)[vemcogroup/laravel-translation

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

136327.1k3](/packages/vemcogroup-laravel-translation)[vildanbina/laravel-auto-translation

A Laravel package for automating the translation of language files.

9626.1k4](/packages/vildanbina-laravel-auto-translation)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[bambamboole/laravel-translation-dumper

A laravel package to dump missing translation keys into the translation files

1036.0k3](/packages/bambamboole-laravel-translation-dumper)

PHPackages © 2026

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