Translation in UrlManager

Hi, I use the following in config/main.php to make the urls translateable:




		'urlManager'=>array(

			'urlFormat'=>'path',

			'showScriptName' => false,

			'rules'=>array(

				'/' => 'site/index',

				'/'.toAscii(Yii::t('base','Anmelden')) => 'site/login',

				'/'.toAscii(Yii::t('base','Abmelden')) => 'site/logout',


				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

			),

		),



This works fine for me. mypage.com/anmelden leads to site/login. BUT has anyone an idea, how to tell the CViewAction to translate the name of the view file? I need something like


'/'.toAscii(Yii::t('base','Impressum')) => array('site/page', 'view' => 'imprint'),

But this does not work.

Ok,I solved it by using


'/'.toAscii(Yii::t('base','Statisch')).'/<view:[\w-]+>' => 'site/page',

adding imprint.php in pages and a softlink to impressum.php ::)

Hi!

I’m new to yii and I’m trying to set an environment with translated url.

My rule looks like:


'<lang:('.$lang.')>/'.Yii::t('url','about',null,null,$lang) => array('site/page','view' => 'about'),

I’d like to get rid of the ‘view’ part in the url but I don’t know how to do it. I’ve tried lots of things and the solution you posted still shows it. Is there any way to do what I want?