> Once again: language and locale are different things and you should
> not mix language and locale codes together like that. Language is 2
> characters string from Configure/Session 'Config.language',
> initialized by autodetection or forced by application code. Locale
> identifier used by TranslateBehavior is longer, see L10n::
> $__l10nCatalog (keys locale/localeFallback) and
> TranslateBehavior::_getLocale().
Ok. So locales are ISO 639-3 codes, and language aren't? So englis
locale is 'eng', and language is 'en' ?
If so - why it's like that? Is it some backward compatibility? Because
it's seems a little bit weird.
>
> > > In AppModel::beforeFind() would be useful to check
>
> > > $this->Behaviors->attached('Translate') &&
> > > $this->Behaviors->enabled('Translate')
>
> > Can You tell me why I should do that?
>
> Nothing important, just to initialize $locale property on models only
> if necessary by this snippet of code. One never knows when things like
> that could start biting in large applications.
Ok. Thought there's something more mysterious behind that ;)
>
> > I don't think that beforeFind is a good place to set the locale field,
> > because ...
> > $pages = $this->ArticleVersion->ArticlePage->find('all',
> > array( 'conditions' => array
> > ( 'ArticlePage.article_version_id'=> $article_version_id ),
> > 'order' => 'ArticlePage.id')
> > );
> > ArticlePage seemed to have string in a locale field and no translation
> > problem occured once again.
>
> > Does it have something to do with model chain?
>
> It sounds to me like you are doing it in ArticleVersion::beforeFind()
> instead of AppModel::beforeFind(), or your custom
> ArticlePage::beforeFind() is not calling parent::beforeFind(). Could
> you confirm that?
I definitely have this AppModel::beforeFilter and have no beforeFilter
in ArticleVersion now (tried with explicit call parent::beforeFilter
in ArticleVersion::beforeFilter but it was no difference).
Now I just feel that I made so many changes, so I feel like I'm
chasing my own tail ;) I'll try to sort out what I have there, and let
You know if I have any more questions ;) Thanks a lot for Your help
(for now ]:>)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---