Hi, in Yii 2, how to setup a language?
For example in Yii 1, i setup a language in main:
'sourceLanguage' => 'es',
'language' => 'es'
I try config same in yii 2 editing web file but i haven’t good results.
Thank you for your help…
Hi, in Yii 2, how to setup a language?
For example in Yii 1, i setup a language in main:
'sourceLanguage' => 'es',
'language' => 'es'
I try config same in yii 2 editing web file but i haven’t good results.
Thank you for your help…
What do you mean by haven’t good results? It’s basically the same in Yii2 except that you may specify locale as well.
Thanks for your reply.
I mean the language change does not work. I remember in Yii version 1 performed this same configuration and the words were translated to the language specified, in this case wanted to translate to Spanish.
if your source language is es then there is nothing to translate. you have to set language to es and sourceLanguage should stay english as far as I see.
http://www.yiiframework.com/doc-2.0/guide-i18n.html#message-translation
Thank you! now all is ok…