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 2w ago

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

21

—

LowBetter than 17% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

905d 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

[smarty-gettext/smarty-gettext

Gettext plugin enabling internationalization in Smarty Package files

752.5M8](/packages/smarty-gettext-smarty-gettext)[devaslanphp/auto-translate

Auto generate translation JSON files

6627.3k](/packages/devaslanphp-auto-translate)

PHPackages © 2026

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