Thanks for your comments.
I'll think about it. But I don't understand, what you mean with using
views. The only way I think views are useful in this case is, that I
check in a foreach loop if the contents country_id equals the given
one and skip all other. Maybe that's a solution.

I still think it's quite tricky, because at least in the more complex
find() calls cake is not able to sort out the ones with the wrong
country_id as cake gets some resultsets by making more than one sql
query. In these cases I can't use country_id in where clause.

@John
Actually all content is country specific. But users should be able to
switch the country and keep their login name and passwort. Otherwise,
the best solution would be a different website for each country. If
you live in germany for example you can switch to Austria or
Switzerland and look in the event calender for those countries, as
their main language is also German. Same thing for USA and Canada.

The presentation language is not the problem. That's quite easy done
with the po-files.

Well, I'll try out a few things and post the best solution, when I'm
done.

Happy Eastern

Donnerbeil

On 8 Apr., 08:05, John Andersen <j.andersen...@gmail.com> wrote:
> If I understand you correctly, then you have content that are not
> related to a specific country and you have country specific content.
>
> One thing is to use I10n to change the presentation language, the
> other is to change the content from non specific to country specific.
> In that case you may look 
> athttp://book.cakephp.org/view/72/Additional-Methods-and-Properties
> for defining your own functions when the country specific content has
> been chosen.
>
> Hope this helps you on the way,
> Enjoy,
>    John
>
> On Apr 8, 1:57 am,donnerbeil<donnerb...@googlemail.com> wrote:
>
> > Hi,
>
> > I have a community website. At the moment it's only in German, but I'm
> > trying to get it international. Of course there are a lot of useful
> > l10n and i18n classes in cake, but in my case I need something else.
>
> > The content for each country is totally different. I don't need to
> > have translated content. For example I have events for each country.
> > So if you switch to the italian version of the website, only the
> > events in Italy should be visible in the event calendar. Same thing
> > with some other model data.
>
> > Is there any convenient way to tell cake that it should look for a
> > country_id in the models db-table and if it exists, then only data
> > with the given country_id should be found via find('all'), find
> > ('list', paginate() etc.
>
> > I was thinking of an afterFind() method, that checks if the country_id
> > is set in the result array and then unsets all array keys where the
> > country_id doesn't equal the given country_id. Do you have any other
> > ideas? I'm just not sure, if this is the best way to do it.
>
> > Thanks in advance
>
> >Donnerbeil
--~--~---------~--~----~------------~-------~--~----~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to