function UserAgentTest::getMappings
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php \Drupal\Tests\Component\Utility\UserAgentTest::getMappings()
- 10 core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php \Drupal\Tests\Component\Utility\UserAgentTest::getMappings()
- 11.x core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php \Drupal\Tests\Component\Utility\UserAgentTest::getMappings()
Helper method to supply language mappings to testGetBestMatchingLangcode().
Return value
array Language mappings.
1 call to UserAgentTest::getMappings()
- UserAgentTest::testGetBestMatchingLangcode in core/
tests/ Drupal/ Tests/ Component/ Utility/ UserAgentTest.php - Tests matching language from user agent.
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ UserAgentTest.php, line 52
Class
- UserAgentTest
- Tests bytes size parsing helper methods.
Namespace
Drupal\Tests\Component\UtilityCode
protected function getMappings() {
return [
'no' => 'nb',
'pt' => 'pt-pt',
'zh' => 'zh-hans',
'zh-tw' => 'zh-hant',
'zh-hk' => 'zh-hant',
'zh-mo' => 'zh-hant',
'zh-cht' => 'zh-hant',
'zh-cn' => 'zh-hans',
'zh-sg' => 'zh-hans',
'zh-chs' => 'zh-hans',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.