PHPackages                             vectorwyse/locale-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. vectorwyse/locale-switcher

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

vectorwyse/locale-switcher
==========================

Adds locale switching to a Laravel project

v1.3(6y ago)34.4k↓88%MITPHP

Since Jun 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/vectorwyse/laravel-locale-switcher)[ Packagist](https://packagist.org/packages/vectorwyse/locale-switcher)[ RSS](/packages/vectorwyse-locale-switcher/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)DependenciesVersions (6)Used By (0)

Laravel Locale Switcher
=======================

[](#laravel-locale-switcher)

> Adds locale switching to a Laravel project.

Give users ability to toggle between languages. Provides template for language dropdown. Selected language will be saved to the database.

[![](screenshot.png)](screenshot.png)

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

[](#installation)

```
composer require vectorwyse/locale-switcher
php artisan migrate
```

Usage
-----

[](#usage)

Add list of supported locales and descriptions in `config/app.php`. Make sure you have all the language files!

```
'available_locales' => [
    'en' => 'English',
    'es_es' => 'Español',
    'zh_TW' => '中文',
],
```

### Nova

[](#nova)

If you are using Nova, add the following to your header template:

```
@include('locale-switcher::nova-dropdown')
```

This will add a `` component. If you would like to style any of the elements within the template, pass in an `$attributes` array. We currently only support the elements listed below:

```
@include('locale-switcher::nova-dropdown', ['attributes' => [
    'dropdown' => ['class' => 'ml-auto h-9 flex items-center dropdown-right'],
    'dropdown-trigger' => ['class' => 'h-9 flex items-center text-90'],
    'dropdown-menu' => ['width' => '200', 'direction' => 'rtl'],
    'a' => ['class' => 'block no-underline text-90 hover:bg-30 p-3'],
]])
```

If you would like to override the existing template completely and style your own, put the code in `resources/views/vendor/locale-switcher/nova-dropdown.blade.php`

### Vanilla HTML

[](#vanilla-html)

Coming soon!

Support Us
----------

[](#support-us)

[Vectorwyse](https://vectorwyse.com) is a digital agency offering advisory and web development services. We love building things with Laravel and Vue.js, so when we have an opportunity to give back to the community, we're super excited!

If you find this package useful, or if you would like us to build something for you, feel free to [drop us a line!](mailto:hello@vectorwyse.com)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% 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 ~56 days

Total

4

Last Release

2419d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4dcf578e60ccbe9e62ece1c56df737c8a5bddb421a124b8eabc0d8e8b23e6136?d=identicon)[vectorwyse](/maintainers/vectorwyse)

---

Top Contributors

[![jelib3an](https://avatars.githubusercontent.com/u/50533338?v=4)](https://github.com/jelib3an "jelib3an (13 commits)")[![samrodrigues](https://avatars.githubusercontent.com/u/16259394?v=4)](https://github.com/samrodrigues "samrodrigues (1 commits)")

### Embed Badge

![Health badge](/badges/vectorwyse-locale-switcher/health.svg)

```
[![Health](https://phpackages.com/badges/vectorwyse-locale-switcher/health.svg)](https://phpackages.com/packages/vectorwyse-locale-switcher)
```

###  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)[saeven/circlical-po-editor

Gettext \*.PO file editor and parser for PHP.

118.1k1](/packages/saeven-circlical-po-editor)

PHPackages © 2026

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