You are here

public function GoogleMini::setLanguageFilter in Google Search Appliance 5

Same name and namespace in other branches
  1. 6.2 GoogleMini.php \GoogleMini::setLanguageFilter()

Sets the languages to be used in the search, if none specified, searches all languages

Parameters

array $languages:

File

./GoogleMini.php, line 91

Class

GoogleMini

Code

public function setLanguageFilter($languages = null) {
  if ($languages) {
    if (is_array($languages)) {
      $this
        ->setQueryPart("lr", implode('|', $languages));
    }
    else {
      $this
        ->setQueryPart("lr", $languages);
    }
    return true;
  }
  return false;
}