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

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

exolnet/laravel-translation
===========================

Library to manage Laravel translations

v4.2.0(3mo ago)326.0k↓38.5%[1 PRs](https://github.com/eXolnet/laravel-translation/pulls)MITPHPPHP ^8.2CI passing

Since Dec 14Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/eXolnet/laravel-translation)[ Packagist](https://packagist.org/packages/exolnet/laravel-translation)[ Docs](https://github.com/eXolnet/laravel-translations)[ RSS](/packages/exolnet-laravel-translation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (36)Used By (0)

Laravel Translation
===================

[](#laravel-translation)

[![Latest Stable Version](https://camo.githubusercontent.com/23b087a77ebf16f20d2f26edc5643a550f097c58a1f5fc840200cfa38aadff40/68747470733a2f2f706f7365722e707567782e6f72672f65586f6c6e65742f6c61726176656c2d7472616e736c6174696f6e2f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/eXolnet/laravel-translation)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/0b99766bf1a6f91190a2b530f4a48339f85c5e5cae1f332906621e028bd7fa17/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f65586f6c6e65742f6c61726176656c2d7472616e736c6174696f6e2f74657374732e796d6c3f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/eXolnet/laravel-translation/actions?query=workflow%3Atests)[![Total Downloads](https://camo.githubusercontent.com/73b5c4c5bff0811f07b0fcd322502969a2911ba29458a65d19b2ef86828a1427/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f65586f6c6e65742f6c61726176656c2d7472616e736c6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eXolnet/laravel-translation)

Library to manage Laravel translations

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

[](#installation)

Require this package with composer:

```
composer require exolnet/laravel-translation
```

To make sure the routing system is using the one supporting the translation you must edit your `bootstrap/app.php` to change the Application class import

```
sed -i '' 's/Illuminate\\Foundation\\Application/Exolnet\\Translation\\Application/g' bootstrap/app.php
```

Now you're ready to start using the translation in your application.

Config
------

[](#config)

### Config Files

[](#config-files)

In order to edit the default configuration (where for e.g. you can find `available_locales`) for this package you may execute:

```
php artisan vendor:publish --provider="Exolnet\Translation\TranslationServiceProvider"
```

After that, `config/translation.php` will be created. Inside this file you will find all the fields that can be edited in this package.

Usage
-----

[](#usage)

Exolnet Translation uses the URL given for the request. In order to achieve this purpose, a route group should be added into the `routes/web.php` file. It will filter all pages that must be localized.

```
// routes/web.php

Route::groupLocales(function () {
    Route::get('/', ['as' => 'home', 'uses' => 'HomeController@index']);
});
```

Once this route group is added to the routes file, a user can access all locales added into `available_locales`. For example, a user can now access two different locales, using the following addresses:

```
http://url-to-laravel/en
http://url-to-laravel/fr

```

If you when to remove the locale prefix on the base locale you need to set the `$avoidPrefixOnBaseLocale` to `true` when defining the groupLocale

```
// routes/web.php

Route::groupLocales(function () {
    Route::get('/', ['as' => 'home', 'uses' => 'HomeController@index']);
})->hiddenBaseLocale();
```

Testing
-------

[](#testing)

To run the phpUnit tests, please use:

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE OF CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Alexandre D'Eschambeault](https://github.com/xel1045)
- [Simon Gaudreau](https://github.com/Gandhi11)
- [Patricia Gagnon-Renaud](https://github.com/pgrenaud)
- [All Contributors](../../contributors)

License
-------

[](#license)

Copyright © [eXolnet](https://www.exolnet.com). All rights reserved.

This code is licensed under the [MIT license](http://choosealicense.com/licenses/mit/). Please see the [license file](LICENSE) for more information.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance80

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 60% 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 ~79 days

Recently: every ~265 days

Total

34

Last Release

104d ago

Major Versions

v2.6.0 → v3.0.0-rc.12020-10-14

v3.7.0 → v4.0.02024-04-23

PHP version history (8 changes)v2.0.0PHP &gt;=7.0

v2.0.1PHP ^7.1

v2.3.0PHP ^7.2

v2.3.1PHP &gt;=7.2

v3.1.0PHP ^7.3|^8.0

v3.5.0PHP ^8.0

v4.0.0PHP ^8.1

v4.1.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4064055?v=4)[eXolnet](/maintainers/exolnet)[@eXolnet](https://github.com/eXolnet)

![](https://www.gravatar.com/avatar/c62099358d9b958053df82fe29782cf298c6361d07546fd4df409c85ef63b217?d=identicon)[xel1045](/maintainers/xel1045)

---

Top Contributors

[![xel1045](https://avatars.githubusercontent.com/u/1497697?v=4)](https://github.com/xel1045 "xel1045 (129 commits)")[![Gandhi11](https://avatars.githubusercontent.com/u/4001049?v=4)](https://github.com/Gandhi11 "Gandhi11 (52 commits)")[![ChristopheTremblay](https://avatars.githubusercontent.com/u/61481239?v=4)](https://github.com/ChristopheTremblay "ChristopheTremblay (16 commits)")[![pgrenaud](https://avatars.githubusercontent.com/u/10713979?v=4)](https://github.com/pgrenaud "pgrenaud (15 commits)")[![clablancherie-exo](https://avatars.githubusercontent.com/u/214526504?v=4)](https://github.com/clablancherie-exo "clablancherie-exo (2 commits)")[![JustinDugas](https://avatars.githubusercontent.com/u/27973284?v=4)](https://github.com/JustinDugas "JustinDugas (1 commits)")

---

Tags

hacktoberfestlaravellaravel-packagelocalizationphptranslationlaravelexolnetlaravel-translation

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-translation-manager

Manage Laravel Translations

1.7k3.6M17](/packages/barryvdh-laravel-translation-manager)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

74310.9M66](/packages/laravel-mcp)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[kkomelin/laravel-translatable-string-exporter

Translatable String Exporter for Laravel

3291.4M10](/packages/kkomelin-laravel-translatable-string-exporter)[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[laravel/roster

Detect packages &amp; approaches in use within a Laravel project

15510.4M7](/packages/laravel-roster)

PHPackages © 2026

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