PHPackages                             kingscode/laravel-localize - 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. kingscode/laravel-localize

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

kingscode/laravel-localize
==========================

Laravel Localization in a yiffy.

v2.2(5y ago)29071MITPHPPHP ^7.3|^8.0

Since Jan 31Pushed 5y ago5 watchersCompare

[ Source](https://github.com/kingscode/laravel-localize)[ Packagist](https://packagist.org/packages/kingscode/laravel-localize)[ RSS](/packages/kingscode-laravel-localize/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

Laravel Localize
================

[](#laravel-localize)

[![Packagist](https://camo.githubusercontent.com/8a15894280483d046f13dd3fe5b4cc2ef46c804be05bce405e5fdf16f963918e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b696e6773636f64652f6c61726176656c2d6c6f63616c697a652e7376673f636f6c6f72423d627269676874677265656e)](https://packagist.org/packages/kingscode/laravel-localize)[![Build status](https://github.com/kingscode/laravel-localize/workflows/PHPUnit/badge.svg)](https://github.com/kingscode/laravel-localize/workflows/PHPUnit/badge.svg)[![license](https://camo.githubusercontent.com/0a424f3becb3ed8c7bd34d8978e3d8927c89051800968275b414d6a8349138d4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b696e6773636f64652f6c61726176656c2d6c6f63616c697a652e7376673f636f6c6f72423d627269676874677265656e)](https://github.com/kingscode/laravel-localize)[![Packagist](https://camo.githubusercontent.com/c47ccd17810015e544b4dae9e984bd11541496bfef08aa48071465077c0bc55e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b696e6773636f64652f6c61726176656c2d6c6f63616c697a652e7376673f636f6c6f72423d627269676874677265656e)](https://packagist.org/packages/kingscode/laravel-localize)

An as minimalistic as possible localization package, makes it so the `app.locale` is set to `nl` in the case of `/nl/home`.

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

[](#installation)

Require the package.

```
composer require kingscode/laravel-localize
```

... and optionally publish the config.

```
php artisan vendor:publish --provider="KingsCode\LaravelLocalize\LocalizeServiceProvider"
```

Add the middleware to the needed middleware groups, in our case only to the *web* group.

```
