PHPackages                             shureban/laravel-localization - 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. shureban/laravel-localization

ActiveLaravel-package[Localization &amp; i18n](/categories/localization)

shureban/laravel-localization
=============================

Laravel SDK for searching data in DB using requests

1.0.0(3y ago)04.4k↓100%MITPHPPHP ^8.1

Since Jan 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Shureban/laravel-localization)[ Packagist](https://packagist.org/packages/shureban/laravel-localization)[ RSS](/packages/shureban-laravel-localization/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

laravel-localization
====================

[](#laravel-localization)

Laravel middleware for automatically setting application locale based on [HTTP "Accept-Language"](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language) header

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

[](#installation)

Require this package with composer using the following command:

```
composer require shureban/laravel-localization
```

Add the following class to the `providers` array in `config/app.php`:

```
Shureban\LaravelLocalization\LocalizationServiceProvider::class,
```

You can also publish the config file to change implementations (i.e. interface to specific class).

```
php artisan vendor:publish --provider="Shureban\LaravelLocalization\LocalizationServiceProvider"
```

Usage
-----

[](#usage)

Register `\Shureban\LaravelLocalization\Localization::class` middleware in application's HTTP Kernel.

You can install it as global middleware in Kernel's `$middleware` property:

```
protected $middleware = [
    ...
    \Shureban\LaravelLocalization\Localization::class
];
```

You can install it to specific middleware groups in Kernel's `$middlewareGroups` property:

```
protected $middlewareGroups = [
    'web' => [
        ...
        \Shureban\LaravelLocalization\Localization::class
    ]
];
```

Or you can install is as route middleware in Kernel's `$routeMiddleware` and use it manually in routes:

Kernel:

```
protected $routeMiddleware = [
    ...
    'localization' => \Shureban\LaravelLocalization\Localization::class
];
```

Route file

```
Route::middleware(['localization'])->get('/', [AnyController::class, 'method']);
```

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1166d ago

### Community

Maintainers

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

---

Top Contributors

[![Shureban](https://avatars.githubusercontent.com/u/5560764?v=4)](https://github.com/Shureban "Shureban (3 commits)")

---

Tags

middlewarelaravellocalizationlanguagesshureban

### Embed Badge

![Health badge](/badges/shureban-laravel-localization/health.svg)

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

###  Alternatives

[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

541629.5k3](/packages/codezero-laravel-localized-routes)[arcanedev/laravel-lang

Translations manager and checker for Laravel based on 'Laravel-Lang/lang' package.

7271.3k](/packages/arcanedev-laravel-lang)[zachleigh/laravel-lang-bundler

Create Laravel translations bundles.

2512.5k](/packages/zachleigh-laravel-lang-bundler)

PHPackages © 2026

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