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

Url Rules Based On Language

$
0
0
My site has english and spanish content. If the user chooses to read the spanish content, then the urls are like www.exampleweb.com/es/contenido, and if the user chooses to read the english content, then the url has to be like www.exampleweb.com/en/content.

I already managed to change between the "es" and "en", but i cant change the word "contenido" for "content.

I have this on my main.php, but it doesnt work:
'<language:(es|en)>/Yii::t("translator","content")' => 'content/read'


Thank you for your time, i hope you can help me.

PD: I saw something similar on this site http://www.yiiframework.com/wiki/55/i18n-subdomains-and-url-rules/, but it doesnt fit for what i need.

Viewing all articles
Browse latest Browse all 18717

Trending Articles



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