Hi, I've been using the PRADO Framework for some projects and started using Yii just yesterday. I was going through the guide and tried to translate some of the messages.
So here is what I did:
1. I set the language to pt_br in protected/config/main.php;
2. Inside protected/messages/ I created the folder pt_br and copy the yii.php file from framework/messages/zh_cn.
3. Translated some of the messages in yii.php
But nothing happened.
Then I changed folder's location to framework/messages, only then the messages were changed.
I guess i'm missing something...
Page 1 of 1
Yii locale Translation
#2
Posted 19 October 2008 - 03:29 PM
The directory "framework/messages" is meant to store messages used in the Yii framework, while "protected/messages" is for messages used in an Yii application.
When you use Yii::t() to translate a message, make sure you specify a message category other than "yii". The "yii" category is reserved for messages of the Yii framework core code. I guess that's why you didn't see the translation.
When you use Yii::t() to translate a message, make sure you specify a message category other than "yii". The "yii" category is reserved for messages of the Yii framework core code. I guess that's why you didn't see the translation.
#3
Posted 19 October 2008 - 03:50 PM
The thing is that I'm not creating new messages with yii category.
I was trying to translate the original yii category's messages. I guess that later versions of yii it will have those messages translated, am I right?
I was trying to translate the original yii category's messages. I guess that later versions of yii it will have those messages translated, am I right?
#4
Posted 19 October 2008 - 08:33 PM
That's right. The yii message translations are supposed to be done by Yii team developers (or via user contributions), not users.
Share this topic:
Page 1 of 1

Help

This topic is locked










