function language_get_browser_drupal_langcode_mappings

Same name in other branches
  1. 8.9.x core/modules/language/language.module \language_get_browser_drupal_langcode_mappings()
  2. 10 core/modules/language/language.module \language_get_browser_drupal_langcode_mappings()
  3. 11.x core/modules/language/language.module \language_get_browser_drupal_langcode_mappings()

Returns language mappings between browser and Drupal language codes.

Return value

array An array containing browser language codes as keys with corresponding Drupal language codes as values.

2 calls to language_get_browser_drupal_langcode_mappings()
CKEditor::getLangcodes in core/modules/ckeditor/src/Plugin/Editor/CKEditor.php
Returns a list of language codes supported by CKEditor.
_ckeditor5_get_langcode_mapping in core/modules/ckeditor5/ckeditor5.module
Returns a list of language codes supported by CKEditor 5.

File

core/modules/language/language.module, line 341

Code

function language_get_browser_drupal_langcode_mappings() {
    $config = \Drupal::config('language.mappings');
    if ($config->isNew()) {
        return [];
    }
    return $config->get('map');
}

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