Can anyone out there give a complete solution to implementing I18n? I have a massive amount of data that needs translation, all the views/models/components are read - though I’m purely guessing cos I’ve never gotten beyond adding Yii::t() throughout my code.
The translation has to be in the DB. There would be no other way around it. Using file based translations for a table with over 80,000 records will be insane!
My config is as follows and each and every time I try to run yiic to generatate the translation data I just get errors stating "extract(): First argument should be an array"
return array( ... 'language' => 'en_us', 'sourceLanguage' => 'en_us', ... 'components' => array( ... 'messages' => array( 'class' => 'CDbMessageSource', 'sourceMessageTable' => 'SourceMessage', 'translatedMessageTable' => 'TranslatedMessage', 'cachingDuration' => 1200, 'languages' => array( 'en_gb', 'en_us', 'fr_fr', ), 'fileTypes' => array( 'php', 'js' ), 'exclude' => array( '.svn' ), 'translator' => 'Yii::t', ) ... ) ... )
So then I want to build the messages up with
./protected/yiic message protected/config/console.php
And I just get a whistful of errors starting
"extract(): First arugment should be an array