Add language alias for zh_HANS_CN
This commit is contained in:
parent
90af85d00f
commit
c2855e2e1d
|
|
@ -22,11 +22,6 @@ class DetectLanguagePrefer
|
||||||
{
|
{
|
||||||
$locale = $request->input('lang') ?: ($request->cookie('locale') ?: $request->getPreferredLanguage());
|
$locale = $request->input('lang') ?: ($request->cookie('locale') ?: $request->getPreferredLanguage());
|
||||||
|
|
||||||
// For Microsoft Edge and IE
|
|
||||||
if ($locale == 'zh_HANS_CN') {
|
|
||||||
$locale = 'zh_CN';
|
|
||||||
}
|
|
||||||
|
|
||||||
// If current locale is an alias of other locale
|
// If current locale is an alias of other locale
|
||||||
if (($info = array_get(config('locales'), $locale)) && ($alias = array_get($info, 'alias'))) {
|
if (($info = array_get(config('locales'), $locale)) && ($alias = array_get($info, 'alias'))) {
|
||||||
$locale = $alias;
|
$locale = $alias;
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ return [
|
||||||
'name' => '中文 (简体)',
|
'name' => '中文 (简体)',
|
||||||
'short_name' => 'ZH (CN)',
|
'short_name' => 'ZH (CN)',
|
||||||
],
|
],
|
||||||
|
'zh_HANS_CN' => [
|
||||||
|
'alias' => 'zh_CN',
|
||||||
|
],
|
||||||
'en' => [
|
'en' => [
|
||||||
'name' => 'English',
|
'name' => 'English',
|
||||||
'short_name' => 'EN',
|
'short_name' => 'EN',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user