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

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

bunker/laravel-localization
===========================

this package implements cookie based localization in laravel v10.40.

v1.0.0(2y ago)034GNUPHP

Since Feb 25Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

bunker/laravel-localization
===========================

[](#bunkerlaravel-localization)

this package implements cookie based localization in laravel v10.40.

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

[](#installation)

Install the package with composer

```
  cd to-your-laravel-project-home-directory
  composer require bunker/laravel-localization
```

next add this in Kernel.php

```
    protected $middlewareGroups = [
        'web' => [
            //
            \Bunker\LaravelLocalization\Middleware\SetLocale::class
        ],
```

Documentation
-------------

[](#documentation)

this middleware assumes that you a panel.php file in your project's config directory. in our case, mostly we use this config/panel.php in a scratch project. note that this package only need 'primary\_language', 'available\_languages'

```
     "/assets/images/avatar/avatar.jpg",
        'avatar_path' => "/assets/images/avatar/",
        'date_format' => 'Y-m-d',
        'time_format' => 'H:i:s',
        'primary_language' => 'en',
        'available_languages' => ['en' => 'English', 'bd' => 'Bengali', 'sp' => 'Spanish'],
        'registration_default_role' => 'User'
    ];
```

add this in your blade file to change language

```

        @if(count(config('panel.available_languages', [])) > 1)

                {{ strtoupper(app()->getLocale()) }}

                @foreach(config('panel.available_languages') as $langLocale => $langName)
                {{ $langName }}
                @endforeach

        @endif

```

now every route which has 'web' middleware attached, will be localized.

API Reference
-------------

[](#api-reference)

#### Change language

[](#change-language)

```
  GET example.com?lang=en
```

QueryTypeDescription`lang``string`**Required**. item key from available\_languages from panel.phpFeedback
--------

[](#feedback)

If you have any feedback, please reach out to us at

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

859d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f1f76724a186377782382762d576652f0b925c1e20e9e25501c05cf07a265cb?d=identicon)[mrishawn](/maintainers/mrishawn)

---

Top Contributors

[![vwaaala](https://avatars.githubusercontent.com/u/22525719?v=4)](https://github.com/vwaaala "vwaaala (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

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