anezi/preferred-locale

Automatic selection of user's preferred locale

dev-master 2018-12-08 08:49 UTC

README

Build Status codecov

Preferred locale event subscriber for Symfony projects.

Features:

  • If the locale is not defined in the URL that the subscriber checks in the session, otherwise it checks the browser languages.
  • The locale is displayed in the URL in lowercase and using a hyphen.
  • It converts the locale displayed in the URL into Symfony-compatible locale.