Hi at all,
I'm having some problems with i18n translations.

I have two related tables with their models: Category has many
Subcategory. One Subcategory belongs to a Category. The translations
are stored in i18n table.

I get the Category data:
$cats = $this->Category->find('all');

And I obtain this array data:
-----------START-----------
Array
(
    [Category] => Array
        (
            [id] => 1
            [modified] => 2008-09-22 12:19:06
            [created] => 2008-09-22 12:18:51
            [locale] => en
            [name] => English category
        )
    [Subcategory] => Array
        (
            [0] => Array
                (
                    [id] => 1
                    [category_id] => 1
                    [modified] => 2008-09-22 12:19:32
                    [created] => 2008-09-22 12:19:32
                )
            [1] => Array
                (
                    [id] => 2
                    [category_id] => 1
                    [modified] => 2008-09-22 12:19:32
                    [created] => 2008-09-22 12:19:32
                )
        )
     [Names] => Array
        (
            [0] => Array
                (
                    [id] => 1
                    [locale] => en
                    [model] => Category
                    [foreign_key] => 1
                    [field] => name
                    [content] => English category
                )
        )
)
-----------END-----------

This array is OK, but incomplete for me. I don't know how to obtain
also the related table (Subcategory) translation. Something like this
-----------START-----------
Array
(
    [Category] => Array
        (
            [id] => 1
            [modified] => 2008-09-22 12:19:06
            [created] => 2008-09-22 12:18:51
            [locale] => en
            [name] => English category
        )
    [Subcategory] => Array
        (
            [0] => Array
                (
                    [id] => 1
                    [category_id] => 1
                    [modified] => 2008-09-22 12:19:32
                    [created] => 2008-09-22 12:19:32
                    [locale] => en
                    [name] => English SUBcategory 1
                )
            [1] => Array
                (
                    [id] => 2
                    [category_id] => 1
                    [modified] => 2008-09-22 12:19:32
                    [created] => 2008-09-22 12:19:32
                    [locale] => en
                    [name] => English SUBcategory 2
                )
        )
     [Names] => Array
        (
            [0] => Array
                (
                    [id] => 1
                    [locale] => en
                    [model] => Category
                    [foreign_key] => 1
                    [field] => name
                    [content] => English category
                )
        )
)
-----------END-----------

Any idea?

Thank you very much,
David

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to