mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-09 12:37:38 +08:00
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());
|
||||
|
||||
// For Microsoft Edge and IE
|
||||
if ($locale == 'zh_HANS_CN') {
|
||||
$locale = 'zh_CN';
|
||||
}
|
||||
|
||||
// If current locale is an alias of other locale
|
||||
if (($info = array_get(config('locales'), $locale)) && ($alias = array_get($info, 'alias'))) {
|
||||
$locale = $alias;
|
||||
|
@ -13,6 +13,9 @@ return [
|
||||
'name' => '中文 (简体)',
|
||||
'short_name' => 'ZH (CN)',
|
||||
],
|
||||
'zh_HANS_CN' => [
|
||||
'alias' => 'zh_CN',
|
||||
],
|
||||
'en' => [
|
||||
'name' => 'English',
|
||||
'short_name' => 'EN',
|
||||
|
Loading…
Reference in New Issue
Block a user