function locale_translatable_language_list
Same name and namespace in other branches
- 10 core/modules/locale/locale.module \locale_translatable_language_list()
- 11.x core/modules/locale/locale.module \locale_translatable_language_list()
- 9 core/modules/locale/locale.module \locale_translatable_language_list()
- 8.9.x core/modules/locale/locale.module \locale_translatable_language_list()
Returns list of translatable languages.
Return value
array Array of installed languages keyed by language name. English is omitted unless it is marked as translatable.
15 calls to locale_translatable_language_list()
- LocaleCronHooks::cron in core/
modules/ locale/ src/ Hook/ LocaleCronHooks.php - Implements hook_cron().
- LocaleFetch::buildFetchBatch in core/
modules/ locale/ src/ LocaleFetch.php - Builds a batch to download and import project translations.
- LocaleFetch::buildUpdateBatch in core/
modules/ locale/ src/ LocaleFetch.php - Builds a batch to check, download and import project translations.
- LocaleFileManager::getInterfaceTranslationFiles in core/
modules/ locale/ src/ File/ LocaleFileManager.php - Get interface translation files present in the translations directory.
- LocaleProjectChecker::checkLocalProjects in core/
modules/ locale/ src/ LocaleProjectChecker.php - Check and store the status and timestamp of local po files.
File
-
core/
modules/ locale/ locale.module, line 144
Code
function locale_translatable_language_list() {
$languages = \Drupal::languageManager()->getLanguages();
if (!locale_is_translatable('en')) {
unset($languages['en']);
}
return $languages;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.