PHPackages                             germania-kg/language-negotiation - 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. germania-kg/language-negotiation

ActiveLibrary

germania-kg/language-negotiation
================================

Middleware to store negotiated client language in a Request attribute.

1.1.0(3y ago)034MITPHPPHP ^7.4|^8.0

Since Sep 17Pushed 3y ago2 watchersCompare

[ Source](https://github.com/GermaniaKG/language-negotiation)[ Packagist](https://packagist.org/packages/germania-kg/language-negotiation)[ RSS](/packages/germania-kg-language-negotiation/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (9)Versions (9)Used By (0)

[![](https://camo.githubusercontent.com/cac3140c0c6e758f67a1ba689683ced67aa2d534e2187d6e03c5c721ffe3b976/68747470733a2f2f7374617469632e6765726d616e69612d6b672e636f6d2f6c6f676f732f67612d6c6f676f2d323031362d7765622e7376677a)](https://camo.githubusercontent.com/cac3140c0c6e758f67a1ba689683ced67aa2d534e2187d6e03c5c721ffe3b976/68747470733a2f2f7374617469632e6765726d616e69612d6b672e636f6d2f6c6f676f732f67612d6c6f676f2d323031362d7765622e7376677a)

---

Germania KG · Language Negotiation
==================================

[](#germania-kg--language-negotiation)

[![Tests](https://github.com/GermaniaKG/language-negotiation/actions/workflows/tests.yml/badge.svg)](https://github.com/GermaniaKG/language-negotiation/actions/workflows/tests.yml)

This middleware stores the result of Will Durand's language [Negotiation](https://github.com/willdurand/Negotiation) language in a Request attribute `X-language-negotiated`.

Works with both **PSR-15 *SinglePass*** and traditional **Slim-like *DoublePass*** approach.

Usage
-----

[](#usage)

### Setup

[](#setup)

```
