function _ckeditor5_get_langcode_mapping
Returns a list of language codes supported by CKEditor 5.
Parameters
string|bool $lang: The Drupal langcode to match.
Return value
array|mixed|string The associated CKEditor 5 langcode.
Deprecated
in drupal:11.3.0 and is removed from drupal:12.0.0. Use \Drupal\Core\Language\LanguageManagerInterface instead.
See also
https://www.drupal.org/node/3531600
File
-
core/
modules/ ckeditor5/ ckeditor5.module, line 158
Code
function _ckeditor5_get_langcode_mapping($lang = FALSE) {
@trigger_error('_ckeditor5_get_langcode_mapping() is deprecated in drupal:11.3.0 and is removed from drupal:13.0.0. Use \\Drupal\\Core\\Language\\LanguageManagerInterface instead. See https://www.drupal.org/node/3531600', E_USER_DEPRECATED);
if ($lang) {
return \Drupal::service(LanguageManagerInterface::class)->getMapping($lang);
}
else {
return \Drupal::service(LanguageManagerInterface::class)->getMappings();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.