PHPackages                             lopatin96/laravel-lang-switcher - 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. lopatin96/laravel-lang-switcher

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

lopatin96/laravel-lang-switcher
===============================

Laravel lang switcher

1.0.69(1y ago)09.0k2MITPHPPHP &gt;=8.0

Since Apr 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/lopatin96/laravel-lang-switcher)[ Packagist](https://packagist.org/packages/lopatin96/laravel-lang-switcher)[ RSS](/packages/lopatin96-laravel-lang-switcher/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (71)Used By (2)

Install
=======

[](#install)

### Publish config

[](#publish-config)

```
php artisan vendor:publish --tag="laravel-lang-switcher-config"
```

Add language code and names to the config *config/laravel-lang-switcher.php*:

```
'languages' => [
  'en' => 'English',
  'ru' => 'русский',
]
```

Include lang-switcher anywhere you want, for example in your footer:

```
@include('laravel-lang-switcher::lang-switcher.index')

// or

@include('laravel-lang-switcher::lang-switcher.index', ['align' => 'right'])
```

Add LangSwitcher middleware to middleware array in *app/Http/Kernel.php*:

```
  protected $middleware = [
        …
        \Atin\LaravelLangSwitcher\Http\Middleware\LangSwitcher::class,
    ];
```

Publish images

```
php artisan vendor:publish --tag="laravel-lang-switcher-images"
```

### Trait

[](#trait)

Add **HasLocale** trait to User model

```
use Atin\LaravelLangSwitcher\Traits\HasLocale;

class User extends Authenticatable
{
    use HasLocale, …
```

Images
======

[](#images)

Set of images

### Migrations

[](#migrations)

Run migrations:

```
php artisan migrate
```

Publishing
==========

[](#publishing)

### Migrations

[](#migrations-1)

```
php artisan vendor:publish --tag="laravel-lang-switcher-migrations"
```

### Localization

[](#localization)

```
php artisan vendor:publish --tag="laravel-lang-switcher-lang"
```

### Views

[](#views)

```
php artisan vendor:publish --tag="laravel-lang-switcher-views"
```

### Images

[](#images-1)

```
php artisan vendor:publish --tag="laravel-lang-switcher-images"
```

### Config

[](#config)

```
php artisan vendor:publish --tag="laravel-lang-switcher-config"
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance43

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 75.6% 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 ~10 days

Recently: every ~18 days

Total

70

Last Release

450d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ed7ade2d44e2f66eedf7dec7136ca591145f77d8192bdd789e04797c575d0f3?d=identicon)[Vladyslav Lopatin](/maintainers/Vladyslav%20Lopatin)

---

Top Contributors

[![lopatin96](https://avatars.githubusercontent.com/u/18104593?v=4)](https://github.com/lopatin96 "lopatin96 (59 commits)")[![vladyslav-lopatin-wskz](https://avatars.githubusercontent.com/u/214472383?v=4)](https://github.com/vladyslav-lopatin-wskz "vladyslav-lopatin-wskz (19 commits)")

### Embed Badge

![Health badge](/badges/lopatin96-laravel-lang-switcher/health.svg)

```
[![Health](https://phpackages.com/badges/lopatin96-laravel-lang-switcher/health.svg)](https://phpackages.com/packages/lopatin96-laravel-lang-switcher)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

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