Hello everybody!
I’ve started to learn Yii, I have a question concerning internationalisation,
First I enabled i18n so it worked with CPhpMessageSource as source and it worked fine, now I would like to use use CDbMessageSource as source, what I did already:
1.I’ve created empty tables
CREATE TABLE SourceMessage
(
id INTEGER PRIMARY KEY,
category VARCHAR(32),
message TEXT
);
CREATE TABLE Message
(
id INTEGER,
language VARCHAR(16),
translation TEXT,
PRIMARY KEY (id, language),
CONSTRAINT FK_Message_SourceMessage FOREIGN KEY (id)
REFERENCES SourceMessage (id) ON DELETE CASCADE ON UPDATE RESTRICT
);
these tables are empty
2.I created models of these tables using gii
- added changes to main.php
'components'=>array(
...
'messages' => array(
'class' => 'CDbMessageSource',
// config for db message source here, see http://www.yiiframework.com/doc/api/CDbMessageSource
),
'coreMessages' => array(
'class' => 'CDbMessageSource',
// config for db message source here, see http://www.yiiframework.com/doc/api/CDbMessageSource
),
...
)
my language options are:
'sourceLanguage' => 'en_US',
'language' => 'ru',
after it I’ve tried to open blog page where I have breadcrumbs and I get this:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 76 bytes) in /mnt/md1/home/dima/public_html/yii/framework/YiiBase.php on line 461
I tried to increase memory_limit up to 512Mb but it did not help. Could somebody tell me where the prob is ?
when I switch back to CPhpMessageSource as source then it works ok.