diff -u b/core/lib/Drupal/Core/Language/LanguageManager.php b/core/lib/Drupal/Core/Language/LanguageManager.php --- b/core/lib/Drupal/Core/Language/LanguageManager.php +++ b/core/lib/Drupal/Core/Language/LanguageManager.php @@ -353,15 +353,15 @@ } /** - * The official languages used at the United Nations with - * their English and native names. + * The 6 official languages used at the United Nations. * - * This list is bases on http://www.un.org/en/aboutun/languages.shtml/ and + * This list is bases on + * http://www.un.org/en/aboutun/languages.shtml/ and it * uses the same format as getStandardLanguageList(). * * @return array * An array of language code to language name information. - * Language name information itself is an array of English and native names. + * Language name information is an array of English and native names. */ public static function getUnitedNationsLanguageList() { return array( reverted: --- b/core/modules/ckeditor/config/schema/ckeditor.schema.yml +++ a/core/modules/ckeditor/config/schema/ckeditor.schema.yml @@ -41,4 +41,3 @@ styles: type: string label: 'List of styles' - diff -u b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php --- b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php @@ -64,6 +64,9 @@ LanguageManager::getStandardLanguageList() : LanguageManager::getUnitedNationsLanguageList(); + // Generate the language_list setting as expected by the CKEditor Language + // plugin, but key the values by the full language name so that we can + // sort them later on. foreach ($predefined_languages as $langcode => $language) { $english_name = $language[0]; $direction = empty($language[2]) ? NULL : $language[2]; @@ -89,8 +92,8 @@ public function getButtons() { return array( 'Language' => array( - 'label' => t('Language'), - 'image_alternative' => '' . t('Language') . '', + 'label' => $this->t('Language'), + 'image_alternative' => '' . $this->t('Language') . '', ), ); } @@ -99,6 +102,7 @@ * {@inheritdoc} */ public function settingsForm(array $form, FormStateInterface $form_state, Editor $editor) { + // Defaults. $config = array('list_type' => 'un'); $settings = $editor->getSettings(); if (isset($settings['plugins']['language'])) { @@ -107,12 +111,12 @@ $predefined_languages = LanguageManager::getStandardLanguageList(); $form['list_type'] = array( - '#title' => t('Language list type'), + '#title' => $this->t('Language list type'), '#title_display' => 'invisible', '#type' => 'select', '#options' => array( - 'un' => t('United Nations subset'), - 'all' => t('All @count languages', array('@count' => sizeof($predefined_languages))), + 'un' => $this->t('United Nations subset'), + 'all' => $this->t('All @count languages', array('@count' => sizeof($predefined_languages))), ), '#default_value' => $config['list_type'], '#description' => $this->t('The list of languages to show in the language dropdown. The basic list will only show the six official languages of the UN. The extended list will show all @count languages that are available in Drupal.', array(