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

Abandoned → [shaunthegeek/laravel-locale-setter](/?search=shaunthegeek%2Flaravel-locale-setter)Library

sinkcup/laravel-locale-setter
=============================

detect Accept-Language, setLocale, then you can use Laravel localization

1.0.0(7y ago)33.5k1[1 issues](https://github.com/sinkcup/laravel-locale-setter/issues)MITPHPCI failing

Since Jun 18Pushed 4mo ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (3)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

38

—

LowBetter than 85% of packages

Maintenance45

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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 ~624 days

Total

2

Last Release

2626d ago

Major Versions

0.1.0 → 1.0.02019-03-04

### 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

### Embed Badge

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

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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