Change Core Messages [Solved]

I’m trying to create my own core messages file and put that into protected/messages/mylang/yii.php. The original files that comes with the framework is placed in framework/messages/<langid>/yii.php

I can easily create my own language files, but not for the core messages. The framework will never load my yii.php file.

I have read the wiki article How to customize Yii core messages, but that method does not work. As the commont in the bottom of that pages also says, there is an error message "Property "CWebApplication.coreMessages" is read only."

Anyone has a solution?

Paul

I solved it, and thought I should comment it in case others have problems with it.

in protected/messages/mylang/yii.php i placed my copy of the core messages in my language (change mylang to your language).

In your configuration file (protected/config/main.php) you can add these elements:




'language' => 'no', // The language to translate the application into

'sourceLanguage' => 'en', // The language in the source files (application language)



For core messages you don’t need to copy them to protected/messages.