function LanguageTest::provider

Data provider for ensuring CKEditor 5 UI translations are loaded.

Return value

string[][]

File

core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php, line 85

Class

LanguageTest
Tests for CKEditor 5 UI translations.

Namespace

Drupal\Tests\ckeditor5\FunctionalJavascript

Code

public static function provider() : array {
  return [
    'Language code both in Drupal and CKEditor' => [
      'langcode' => 'th',
      'toolbar_item_name' => 'blockQuote',
      'toolbar_item_translation' => 'คำพูดบล็อก',
    ],
    'Language code transformed from browser mappings' => [
      'langcode' => 'zh-hans',
      'toolbar_item_name' => 'blockQuote',
      'toolbar_item_translation' => '块引用',
    ],
    'Language configuration conflict' => [
      'langcode' => 'fr',
      'toolbar_item_name' => 'textPartLanguage',
      // cSpell:disable-next-line
'toolbar_item_translation' => 'Choisir la langue',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.