Is there any ideas how to find pages by it's translated value of Select Options field title?
For example i want to get pages in current language by some option title:
Default:
1=Precious
2=Semi-precious
Italian:
1=Preziosa
2=Semipreziosa
No idea why italian version returned me empty results.
$type = $sanitizer->text($input->get->type);
$input->whitelist('type', $type);
if($type) {
$results = $pages->find("template=encyclopedia-item, encyclopedia_item_type.title={$type}, limit=5, sort=title");
}
else {
$results = $pages->find("template=encyclopedia-item, limit=5, sort=title");
}
foreach($results as $result) {
echo $result->title;
}
$data contain value Precious/Preziosa