新增首次运行时自动根据当前系统使用的语言设置软件显示的语言
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
新增语言时创建的语言文件夹需要与以下列表对应:
|
||||
|
||||
- `ar-sa` - Arabic Saudi Arabia
|
||||
- `cs-cz` - Czech Czech Republic
|
||||
- `da-dk` - Danish Denmark
|
||||
- `de-de` - German Germany
|
||||
- `el-gr` - Modern Greek Greece
|
||||
- `en-au` - English Australia
|
||||
- `en-gb` - English United Kingdom
|
||||
- `en-ie` - English Ireland
|
||||
- `en-us` - English United States
|
||||
- `en-za` - English South Africa
|
||||
- `es-es` - Spanish Spain
|
||||
- `es-mx` - Spanish Mexico
|
||||
- `fi-fi` - Finnish Finland
|
||||
- `fr-ca` - French Canada
|
||||
- `fr-fr` - French France
|
||||
- `he-il` - Hebrew Israel
|
||||
- `hi-in` - Hindi India
|
||||
- `hu-hu` - Hungarian Hungary
|
||||
- `id-id` - Indonesian Indonesia
|
||||
- `it-it` - Italian Italy
|
||||
- `ja-jp` - Japanese Japan
|
||||
- `ko-kr` - Korean Republic of Korea
|
||||
- `nl-be` - Dutch Belgium
|
||||
- `nl-nl` - Dutch Netherlands
|
||||
- `no-no` - Norwegian Norway
|
||||
- `pl-pl` - Polish Poland
|
||||
- `pt-br` - Portuguese Brazil
|
||||
- `pt-pt` - Portuguese Portugal
|
||||
- `ro-ro` - Romanian Romania
|
||||
- `ru-ru` - Russian Russian Federation
|
||||
- `sk-sk` - Slovak Slovakia
|
||||
- `sv-se` - Swedish Sweden
|
||||
- `th-th` - Thai Thailand
|
||||
- `tr-tr` - Turkish Turkey
|
||||
- `zh-cn` - Chinese China
|
||||
- `zh-hk` - Chinese Hong Kong
|
||||
- `zh-tw` - Chinese Taiwan
|
||||
@@ -9,7 +9,12 @@ const requireLang = require.context(
|
||||
const messages = {}
|
||||
|
||||
for (const file of requireLang.keys()) {
|
||||
if (file === './index.js') continue
|
||||
switch (file) {
|
||||
case './index.js':
|
||||
case './languages.json':
|
||||
case './Readme.md':
|
||||
continue
|
||||
}
|
||||
|
||||
const path = file.replace(/(\.\/|\.json$)/g, '').split('/')
|
||||
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
[
|
||||
{
|
||||
"name": "简体中文",
|
||||
"locale": "cns",
|
||||
"alternate": "zh-Hans",
|
||||
"locale": "zh-cn",
|
||||
"alternate": "zh-hans",
|
||||
"country": "cn",
|
||||
"fallback": true
|
||||
},
|
||||
{
|
||||
"name": "繁体中文",
|
||||
"locale": "cnt",
|
||||
"locale": "zh-tw",
|
||||
"alternate": "zh-hk",
|
||||
"country": "cn"
|
||||
},
|
||||
{
|
||||
"name": "English",
|
||||
"locale": "en",
|
||||
"locale": "en-us",
|
||||
"country": "us"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user