function LocaleLanguages::isTranslatable
Checks whether $langcode is a language supported as a locale target.
Parameters
string $langcode: The language code.
Return value
bool Whether $langcode can be translated to in locale.
File
-
core/
modules/ locale/ src/ LocaleLanguages.php, line 42
Class
- LocaleLanguages
- Manages which languages are translatable and checks a specific language.
Namespace
Drupal\localeCode
public function isTranslatable(string $langcode) : bool {
return $langcode != 'en' || $this->configFactory
->get('locale.settings')
->get('translate_english');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.