Yii Framework Forum: Yii locale Translation - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Yii locale Translation Rate Topic: -----

#1 User is offline   peppers 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 19-October 08

Posted 19 October 2008 - 11:46 AM

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...
0

#2 User is online   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,871
  • Joined: 04-October 08
  • Location:DC, USA

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.
0

#3 User is offline   peppers 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 19-October 08

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?
0

#4 User is online   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,871
  • Joined: 04-October 08
  • Location:DC, USA

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users