Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

How To Translate Cmenu Items

$
0
0
Hi everyone,

After a few months of trying yii im finally getting confortable with it, but im having a very basic problem, or at least I think so..

I know i can use the Yii::t function through my application to translate strings and labels, but for some reason I cant seem to make it work with the CMenu component.

this is what Im trying to do:

public $menu=array(
			array('label' => Yii::t('Option A'), 'url' => array('/optiona')),
		);	


First of all, Is it even possible to pass a translated string to my CMenu item label ?
Everytime I try to do this i get a syntaxis error.

I feel I'm missing something very basic here. Any help would be much appreciated.

Thanks,
Abraham

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>