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
|
# -*- encoding: UTF-8 -*-
def getUI (sLang):
if sLang in dStrings:
return dStrings[sLang]
return dStrings["fr"]
dStrings = {
"fr": {
"title": "Grammalecte · Édition du champ “Auteur”",
"state": "Valeur actuelle du champ “Auteur” :",
"empty": "[vide]",
"newvalue": "Entrez la nouvelle valeur :",
"modify": "Modifier",
"cancel": "Annuler"
},
"en": {
"title": "Grammalecte · Edition of field “Author”",
"state": "Current value of field “Author”:",
"empty": "[empty]",
"newvalue": "Enter the new value:",
"modify": "Modify",
"cancel": "Cancel"
}
}
|
>
|
>
>
>
|
>
>
>
>
>
>
|
>
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
# strings for change author
sUI = "fr"
def selectLang (sLang):
global sUI
if sLang in dStrings:
sUI = sLang
def get (sMsgCode):
try:
return dStrings[sUI].get(sMsgCode, sMsgCode)
except:
return "#error"
dStrings = {
"fr": {
"title": "Grammalecte · Édition du champ “Auteur”",
"state": "Valeur actuelle du champ “Auteur” :",
"empty": "[vide]",
"newvalue": "Entrez la nouvelle valeur :",
"modify": "Modifier",
"cancel": "Annuler"
},
"en": {
"title": "Grammalecte · Edition of field “Author”",
"state": "Current value of field “Author”:",
"empty": "[empty]",
"newvalue": "Enter the new value:",
"modify": "Modify",
"cancel": "Cancel"
}
}
|