-
Notifications
You must be signed in to change notification settings - Fork 0
/
lang_config.py
53 lines (50 loc) · 1021 Bytes
/
lang_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- coding: UTF-8 -*-
# always put en to the first
lang_code_dict = {
# refer: http://api.fanyi.baidu.com/doc/21
"baidu": {
"英语": "en",
"中文": "zh"
},
"tencent": {
"英语": "en",
"中文": "zh"
},
"MarianMT": {
"中文": "en-zh",
"英语": "zh-en"
}
}
# Translation Service Providers
trans_providers = {
"baidu": {
"url": "https://fanyi-api.baidu.com/api/trans/vip/translate",
"has_id": True
},
"tencent": {
"url": "https://tmt.tencentcloudapi.com/?",
"has_id": True
},
"MarianMT": {
"url": "",
"has_id": False
}
}
# user's translation service setting
trans_setting = {
"baidu": {
"is_default": False,
"app_id": "",
"app_key": ""
},
"tencent": {
"is_default": False,
"app_id": "",
"app_key": ""
},
"MarianMT": {
"is_default": True,
"app_id": "",
"app_key": ""
}
}