function LanguageMapper::getMapping

Returns a specific ckeditor langcode based on the requested one.

Parameters

string $langcode: The Drupal langcode to match.

Return value

string The associated CKEditor 5 langcode.

File

core/modules/ckeditor5/src/LanguageMapper.php, line 92

Class

LanguageMapper
Manages language mappings and discovery for ckeditor translations.

Namespace

Drupal\ckeditor5

Code

public function getMapping(string $langcode) : string {
  return $this->getMappings()[$langcode] ?? 'en';
}

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