function LocaleTranslation::canTranslateEnglish
Same name in other branches
- 8.9.x core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::canTranslateEnglish()
- 10 core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::canTranslateEnglish()
- 11.x core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::canTranslateEnglish()
Gets translate english configuration value.
Return value
bool TRUE if english should be translated, FALSE if not.
1 call to LocaleTranslation::canTranslateEnglish()
- LocaleTranslation::getStringTranslation in core/
modules/ locale/ src/ LocaleTranslation.php - Retrieves English string to given language.
File
-
core/
modules/ locale/ src/ LocaleTranslation.php, line 136
Class
- LocaleTranslation
- String translator using the locale module.
Namespace
Drupal\localeCode
protected function canTranslateEnglish() {
if (!isset($this->translateEnglish)) {
$this->translateEnglish = $this->configFactory
->get('locale.settings')
->get('translate_english');
}
return $this->translateEnglish;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.