Nik is right about this. You probably want to change your selector to something like this: $field = $user->language->isDefault() ? "body" : "" . $user->language; $matches = $pages->find("$field*=$q"); That will force it to not consider the default language in the matches at all. However, most of the time you should just do this, which already takes languages into account: $matches = $pages->find("body*=$q"); So whether the user searches for "Beer" or "Cerve
    • Like