Im having trouble understanding why I cannot use features like ->search(), filterBy() or find() for pages that are multilanguaged.
For example: If I have one page but two translations for it one is called “Zielorte” and one is called “Destinations”. They are the same page just transalated. German beeing the default language and english beeing my secondary language.
If I try to use the following snippet I will get a result returned like I would assume it to happen:
$data = $pages->search("zielorte", 'title');
When doing this though I will not get any results:
$data = $pages->search("destinations", 'title')
I come across the same problem with every method i’ve tried for the $pages collection that should help find specific pages.
You could just do something like:
$data = $pages->search("zielorte", 'title'):
echo $data->content('en')->field();
But not in my case, because whatever will be inserted into search() will be provided by the user, so I have to be able to search my $pages collection in other languages than the default language.