Fix wrong i18n detection on Edge & IE
This commit is contained in:
parent
577c5ab8df
commit
88f7fe6850
|
|
@ -21,6 +21,9 @@ class DetectLanguagePrefer
|
|||
public function detect(Request $request)
|
||||
{
|
||||
$locale = $request->input('lang') ?: ($request->cookie('locale') ?: $request->getPreferredLanguage());
|
||||
if ($locale == 'zh_HANS_CN') { // For Microsoft Edge and IE
|
||||
$locale = 'zh_CN';
|
||||
}
|
||||
|
||||
// if current locale is an alias of other locale
|
||||
if (($info = array_get(config('locales'), $locale)) && ($alias = array_get($info, 'alias'))) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user