locale_translatable_language_list

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;
}
doc_Drupal
2016-10-29 09:24:19
Comments
Leave a Comment

Please login to continue.