You are here

protected function LocaleSourcePluginUi::getLanguages in Translation Management Tool 8

Returns languages, ensures that english is first.

Return value

array

2 calls to LocaleSourcePluginUi::getLanguages()
LocaleSourcePluginUi::getTranslationData in sources/locale/src/LocaleSourcePluginUi.php
Helper function to create translation data list for the sources page list.
LocaleSourcePluginUi::overviewFormHeader in sources/locale/src/LocaleSourcePluginUi.php
Gets overview form header.

File

sources/locale/src/LocaleSourcePluginUi.php, line 277

Class

LocaleSourcePluginUi
Locale source plugin UI.

Namespace

Drupal\tmgmt_locale

Code

protected function getLanguages() {

  // Make sure that en is the first language.
  $languages = \Drupal::languageManager()
    ->getLanguages();
  $en = $languages['en'];
  unset($languages['en']);
  $languages = array(
    'en' => $en,
  ) + $languages;
  return $languages;
}