Translate URL

Translate

Basic tamplate

config ->web.php


'urlManager' => [




'enablePrettyUrl' => true,

'showScriptName' => false,

'enableStrictParsing' => false,

'rules' => [


'<language:\w+>/home' =>'site/index',

'<language:\w+>/about' => 'site/about',

'<language:\w+>/contact' => 'site/contact',

],

How can I translate the URL, home, about and contact worlds?

‘<language:\w+>/Yii::t(‘app’, ‘Home’)’ =>‘site/index’, This solution did not work

‘<language:\w+>/’.Yii::t(‘app’, ‘Home’) =>‘site/index’, This solution did not work

I want to Translate the webpages of my website, at the same time i want to translate the URL.Possible?

The translate be in good working of my website but (in url not),thanks for the help.