Translation of coreMessages from database not possible

Hi everyone,

I’ve setup an application with internationalisation from database. While I have all my custom messages in that database, I thought I could just as well put all the coreMessages in there. This however seems not possible because CApplication.coreMessages is of type CPhpMessageSource.

Why isn’t coreMessages of type CMessageSource?

no one any idea?

If that were the case then yii would require a database connection to work properly, it would probably need to be distributed with the data for the multiple database schemas it supports. You could possibly modify the core to suit your needs. I’m sure you could see the implications of all that.

You can configure the class of ‘coreMessages’ to be CDbMessageSource.

I didn’t say “CDbMessageSource”, but “CMessageSource”. It’s the same class “messages” derives from. For messages you can make the choice to use a database or not. In that case a database connection wouln’t be required, am I right?

I do not want to mess with the core because updates would kill my app.

Sorry for reply in old message.

But the type of coreMessages component is CPhpMessageSource and not CMessageSource be like messages component.

So, don’t work this way, is any idea for use coreMessages from Database?