Thanks a lot my friend ! Your english is very cool and your post was very helpfool.
Kind regards ! :) On 3 Σεπτ, 14:23, Jaime Dominguez <[email protected]> wrote: > I'm struggling with translate too but I'll try to help. > > Every line in the i18n table it should have the model, the locale, the > foreign key to the model item id and the translated content. > > If you want to translate only one field per item only one row should > be added to the i18n table so what I see it's wrong to me. > > Try > var $actsAs = array( > 'Translate'=>array( > 'name' > ) > ); > > I don't see need for the nameTranslated thingy. And, and this is > worse, you are not changing correctly the language. > > 1 gre MenuGroup 1 name > My greek content > 2 gre MenuGroup 2 name > My another greek content > 3 ENG MenuGroup 3 name > My english content > 4 ENG MenuGroup 4 name > My another english content > > This is how should look your table after adding english content, see > that locale (caps-lock intended) ENG instead of GRE? > > Further reading: > > These are the articles who enlighted me :) > > http://teknoid.wordpress.com/2008/11/28/cakephp-url-based-language-sw...http://www.slideshare.net/real34/internationalizing-cakephp-applications > > The first one is great to change language and get working the __() > translation systems but i have to replace the _setLanguage() function > that he proposed for this one to make translate behaviour work as > expected: > > function _setLanguage() { > > if ($this->Cookie->read('lang') && !$this->Session->check > ('Config.language')) { > $this->Session->write('Config.language', > $this->Cookie->read > ('lang')); > Configure::write('Config.language', > $this->Cookie->read > ('lang')); > } > else if (isset($this->params['language']) && ($this->params > ['language'] != $this->Session->read('Config.language'))) { > $this->Session->write('Config.language', $this->params > ['language']); > Configure::write('Config.language', > $this->params['language']); > $this->Cookie->write('lang', $this->params['language'], null, > '20 days'); > } > else { > Configure::write('Config.language', > $this->Session->read > ('Config.language')); > } > > } > > Hope I helped and I hope my english is clear enough too. > > On Sep 2, 10:50 am, DatacenterHellas <[email protected]> wrote: > > > There is none who can help me ? ? ? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
