[BUGFIX] Use English labels if browser's preferred language is English 25/52325/2
authorXavier Perseguers <xavier@typo3.org>
Mon, 3 Apr 2017 09:13:01 +0000 (11:13 +0200)
committerBenni Mack <benni@typo3.org>
Mon, 3 Apr 2017 12:48:50 +0000 (14:48 +0200)
Change-Id: Ic9cb3f3e3e0547e4a0d34bf50f481e2f3844f610
Resolves: #80593
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/52325
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Charset/CharsetConverter.php

index cf74e5c..108108b 100644 (file)
@@ -1758,7 +1758,10 @@ class CharsetConverter
             $allLanguageCodes[$typo3Lang] = $isoLang;
         }
         // Move the iso codes to the (because we're comparing the keys with "isset" later on)
-        return array_flip($allLanguageCodes);
+        $allLanguageCodes = array_flip($allLanguageCodes);
+        // We need to add the default language (English)
+        $allLanguageCodes['en'] = 'default';
+        return $allLanguageCodes;
     }
 
     /********************************************