Add some comments on the language code normalization

This commit is contained in:
Sébastien Lucas 2015-02-06 20:55:32 +01:00
parent c5c9ffc3b0
commit 3b855b9e42
1 changed files with 1 additions and 0 deletions

View File

@ -207,6 +207,7 @@ function getAcceptLanguages() {
if (count($lang_parse[1])) {
$langs = array();
foreach ($lang_parse[1] as $lang) {
// Format the language code (not standard among browsers)
if (strlen($lang) == 5) {
$lang = str_replace("-", "_", $lang);
$splitted = preg_split("/_/", $lang);