PHPackages                             per-seo/locale - 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. per-seo/locale

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

per-seo/locale
==============

Language in URI for Slim 4. This Middleware add an attribute 'locale' to the request object, to help with page translation for SEO.

1.1.2(10mo ago)0126MITPHPPHP &gt;=7.4

Since Nov 20Pushed 10mo agoCompare

[ Source](https://github.com/per-seo/locale)[ Packagist](https://packagist.org/packages/per-seo/locale)[ Docs](https://github.com/per-seo/locale)[ RSS](/packages/per-seo-locale/feed)WikiDiscussions main Synced 1mo ago

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

A simple middleware for Slim4 framework for using locale in uri. Usage is very simple, just add in your container settings this array:

```
'settings_global' => [
        'language' => 'it',
        'languages' => ['it', 'en'],
		    'locale' => true,
]

```

And enable this Middleware (in the Middleware part of your Slim4 Project) with:

```
