views:

35

answers:

1

I use cakphp version 1.3. The documentation says, that if I want to use the translation behavior for my dynamic content no changes in my view are necessarily. The problem is, that the translated fields are there but empty. The translation only appears in the ['I18n'] array like this

  Array
(
    [0] => Array
        (
            [Category] => Array
                (
                    [id] => 1
                    [locale] => de_de
                    [name] => 
                )

            [I18n] => Array
                (
                    [name] => Anlagenkomponenten
                )

        )....

I expected the Array like this

  Array
(
    [0] => Array
        (
            [Category] => Array
                (
                    [id] => 1
                    [locale] => de_de
                    [name] => Anlagenkomponenten
                )

            [I18n] => Array
                (
                    [name] => Anlagenkomponenten
                )

        )....

Does I expect this wrong or is this a bug?

A: 

In cakephp 1.2.6...In Translate Bahavior go to line 243 and comment until 245. i think its the same in cakephp 1.3 //if (!empty($results[$key]['I18n_'.$field]['content'])) { // $value = $results[$key]['I18n_'.$field}['content']; // } then add the code

if (!empty($results[$key]['I18n'][$field])) {
                        $value = $results[$key]['I18n'][$field];
                                        }