quillphp / i18n
Internationalization and localization for the Quill PHP framework
dev-main
2026-04-06 10:00 UTC
Requires
- php: ^8.3
- quillphp/quill: ^0.0.2
- symfony/translation: ^7.0
Requires (Dev)
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-04-06 11:58:54 UTC
README
Internationalization (i18n) and localization middleware for the Quill PHP Framework.
Installation
composer require quillphp/i18n
Usage
use Quill\I18n\I18n; use Symfony\Component\Translation\Translator; $translator = new Translator('en'); $app->use(I18n::new([ 'translator' => $translator, 'supported' => ['en', 'fr', 'es'], ]));
Configuration
| Option | Default | Description |
|---|---|---|
| `header` | `'Accept-Language'` | The HTTP header containing the locale. |
| `query` | `'lang'` | The URL query parameter containing the locale. |
| `default_locale` | `'en'` | The default locale if none is detected. |
| `supported` | `['en']` | An array of supported locales. |
License
MIT