PHPackages                             shaunthegeek/laravel-locale-setter - 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. shaunthegeek/laravel-locale-setter

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

shaunthegeek/laravel-locale-setter
==================================

detect Accept-Language, setLocale for Laravel

v2.0.0(4mo ago)31091[1 issues](https://github.com/shaunthegeek/laravel-locale-setter/issues)MITPHPCI failing

Since Jun 18Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/shaunthegeek/laravel-locale-setter)[ Packagist](https://packagist.org/packages/shaunthegeek/laravel-locale-setter)[ RSS](/packages/shaunthegeek-laravel-locale-setter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Laravel Locale Setter Middleware
================================

[](#laravel-locale-setter-middleware)

Automatically scanning the lang directory for locales, detecting the HTTP Accept-Language header, and setting the Laravel locale — all are handled seamlessly by this package.

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

[](#installation)

```
composer require shaunthegeek/laravel-locale-setter

```

Add Middleware
--------------

[](#add-middleware)

```
// bootstrap/app.php
->withMiddleware(function (Middleware $middleware) {
    $middleware->web(remove: [
        \Illuminate\Routing\Middleware\SubstituteBindings::class,
    ]);
    $middleware->web(append: [
        ShaunTheGeek\LaravelLocaleSetter\Middleware\DetectLocale::class,
        \Illuminate\Routing\Middleware\SubstituteBindings::class,
    ]);
})

```

Optional
--------

[](#optional)

If you wish to modify the configuration, please publish it first.

```
php artisan vendor:publish --tag=locale-config

```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance70

Regular maintenance activity

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~1561 days

Total

3

Last Release

128d ago

Major Versions

0.1.0 → 1.0.02019-03-04

1.0.0 → v2.0.02026-01-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/89ddc639897087464ea88b1e5481834d86fe581c94a2333cfe2778a4e93b65bd?d=identicon)[sinkcup](/maintainers/sinkcup)

---

Top Contributors

[![shaunthegeek](https://avatars.githubusercontent.com/u/4971414?v=4)](https://github.com/shaunthegeek "shaunthegeek (6 commits)")

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/shaunthegeek-laravel-locale-setter/health.svg)

```
[![Health](https://phpackages.com/badges/shaunthegeek-laravel-locale-setter/health.svg)](https://phpackages.com/packages/shaunthegeek-laravel-locale-setter)
```

###  Alternatives

[mcamara/laravel-localization

Easy localization for Laravel

3.5k9.1M112](/packages/mcamara-laravel-localization)[typicms/base

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

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

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

135304.0k2](/packages/vemcogroup-laravel-translation)

PHPackages © 2026

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