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.
File
- core/modules/locale/locale.module, line 251
- Enables the translation of the user interface to languages other than English.
Code
function locale_translatable_language_list() { $languages = \Drupal::languageManager()->getLanguages(); if (!locale_is_translatable('en')) { unset($languages['en']); } return $languages; }
Please login to continue.