yii2-extensions / localeurls
Automatic locale/language management for URLs.
Fund package maintenance!
terabytesoftw
Installs: 2 986
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 1
Requires
- php: >=8.1
- ext-mbstring: *
- yiisoft/yii2: ^2.0.52 || ^22
Requires (Dev)
- infection/infection: ^0.27|^0.29
- maglnet/composer-require-checker: ^4.1
- nikic/php-parser: ^4.1|^5.4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-strict-rules: ^2.0.3
- phpunit/phpunit: ^10.5
- rector/rector: ^2.0
- symplify/easy-coding-standard: ^12.3
- yii2-extensions/phpstan: ^0.2.3
This package is auto-updated.
Last update: 2025-06-18 23:51:37 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
BSD-3-Clause license. Please see License File for more information.
Fork
This package is a fork of https://github.com/codemix/yii2-localeurls with some corrections.