English Default Messages


I’m using Yii 1.1.12.

Damn my blindness, I cannot find the file containing all of the English messages that are the default.

I need to change a few of them.

I did not find anything in yii\framework\messages for en or en_*.



can you do it in previous version? - you might not.

since en (English) is the default, all the messages are spread in framework code, i randomly pickup one piece of code:


			throw new CException(Yii::t('zii','The "dataProvider" property cannot be empty.'));

Is this the beauty of Yii handling different languages?!

plus, i don’t believe it’s good idea to touch original framework code for this purpose.

Thanks for the help.

Support for different languages is a must!

I understand the need to have a default, but I would have presumed that the en_* file would also be present.

I cannot go thru the whole code base to extract all of the English messages to build my own file.

Any other solutions possible?

would be an idea to fake a language and use that one as English instead?

for example zz as default language and have all your customized English language message there, it’s a bit confusing but much better than hacking framework.

it’s my 2 cents.

Perhaps but there is a way to change the file for the default messages.




Its just that I need to create the file with all of the current messages and change the only one that needs to be modified.

But this will work for now, but future framework versions may add new messages and my default file will be out of sync.

I guess the best way would be for the Yii framework to always generate a file with all of the default messages which I can safely copy and modify.

Unless I create a file with the one message I need to change. Will the framework continue on with the default if the message is not found in the new core default file?

if i don’t remember wrong there are a couple of extensions there to handle you with languages.

i never tried myself but you may want to try that way.

i would imagine manually handling translations is a painful job to do.

To complete this thread, this is what I have finally done.

Created a yii.php file in the languages my application supports.

Dropped the appropriate file in its directory.

protected/messages/en etc.

The file contains one line:

‘Please fix the following input errors:’ => ‘Please correct the following errors:’,

The main.php config file has been modified





Still need to test if the default messages will still be displayed if it is not found in the new yii.php file.