function language_get_browser_drupal_langcode_mappings

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.

File

core/modules/language/language.module, line 393
Add language handling functionality to Drupal.

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!language!language.module/function/language_get_browser_drupal_langcode_mappings/8.1.x