yii2-extensions / localeurls
Automatic locale/language management for URLs.
Fund package maintenance!
terabytesoftw
Installs: 2 735
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=8.2
- ext-mbstring: *
- yiisoft/yii2: ^2.0.52 || ^22
Requires (Dev)
- infection/infection: ^0.29
- maglnet/composer-require-checker: ^4.6
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5
- rector/rector: ^2.0
- symplify/easy-coding-standard: ^12.3
This package is auto-updated.
Last update: 2025-06-02 16:13:06 UTC
README
Locale URLs
Installation
The preferred way to install this extension is through composer.
Either run
composer require --dev --prefer-dist yii2-extensions/localeurls
or add
"yii2-extensions/localeurls": "dev-main"
to the require-dev section of your composer.json
file.
Configuration
To use this extension, you need to configure the urlManager
component in your application configuration file.
'components' => [ 'urlManager' => [ 'class' => yii2\extensions\localeurls\UrlLanguageManager::class, 'languages' => [ 'en' => 'en-US', 'es' => 'es-ES', 'ru' => 'ru-RU', ], 'enablePrettyUrl' => true, 'showScriptName' => false, ], ],
Quality code
Testing
Check the documentation testing to learn about testing.
Our social networks
License
The MIT License. Please see License File for more information.
Fork
This package is a fork of https://github.com/codemix/yii2-localeurls with some corrections.