So I create a model that acts as I18n. I do it just as the docs say.
Then when I try to add something with
$record['Translation']['language']['column'] = 'value'; I get the
following exception:
Doctrine_Record_UnknownPropertyException: Unknown record property /
related component "Translation" on "Simple"
I also got another exception when creating the tables in
Doctrine/Record/Generator.php:159 because class_exists() was trying to
autoload a class that didn't exist. That class was the translation
class. I got rid of that by adding false as the second argument to
class_exists() but perhaps that was a sign of a deeper problem. It
does correctly create the db tables, but only when I add false as the
second argument to class_exists() or remove the act asi18n you see
below.
Here is how I create the translation:
$this->actAs('I18n', array(
'length' => 5,
'fields' => array(
'price',
'type',
'name',
'description',
'shortDescription',
'featured',
'metaDescription',
'metaKeywords',
'active',
'featured',
'visible'
),
)
);
And I would set it like this:
$productObj['Translation']['en_US']['price'] = 29.99;
If it makes any difference I am running the
Doctrine_Core::createTablesFromModels() method from my test case, not
the cli. And I am using version 1.2.
Mark
--
Have fun or die trying - but try not to actually die.