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.
To use this extension, you need to configure the localeUrls
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,
],
],
Check the documentation testing to learn about testing.
The MIT License. Please see License File for more information.
This package is a fork of https://github.com/codemix/yii2-localeurls with some corrections.