public function GoogleCSEServices::paramhl in Google Custom Search Engine 8.2
Same name and namespace in other branches
- 8.3 src/GoogleCSEServices.php \Drupal\google_cse\GoogleCSEServices::paramhl()
Returns "hl" language param for search request.
Return value
string The language code.
1 call to GoogleCSEServices::paramhl()
- GoogleCSEServices::service in src/
GoogleCSEServices.php - Sends query to Google's Custom Search Engine and returns response.
File
- src/
GoogleCSEServices.php, line 155
Class
- GoogleCSEServices
- Additional functions as services for Google CSE.
Namespace
Drupal\google_cseCode
public function paramhl() {
$language = $this->CSEconfig
->get('configuration')['google_cse_adv_language'];
switch ($language) {
case 'active':
$language = $this->languageManager
->getCurrentLanguage();
return $language
->getId();
default:
return '';
}
}