← Ресурсы
translation.rpy
скрипт / 1,7 КБ / 52 строки
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
51init -1001 python:
if _preferences.language == "english":
translation=translation_en
elif _preferences.language == "spanish":
translation=translation_es
elif _preferences.language == "italian":
translation=translation_it
elif _preferences.language == "chinese":
translation=translation_ch
elif _preferences.language == "french":
translation=translation_fr
elif _preferences.language == "portuguese":
translation=translation_pg
elif _preferences.language == "turkish":
translation=translation_tr
else:
translation=translation_ru
translation_new=translation
def merge_two_dicts(x, y):
z = x.copy()
z.update(y)
return z
translation_temp={}
for i,k in translation.iteritems():
translation_temp[i]={}
translation_temp[i][_preferences.language]=k
translation=merge_two_dicts(translation,translation_temp)
def get_translation(string):
renpy.log("%s" % string )
return translation[string][_preferences.language]
init python:
def translation_init():
if _preferences.language == "english":
translation=translation_en
elif _preferences.language == "spanish":
translation=translation_es
elif _preferences.language == "italian":
translation=translation_it
elif _preferences.language == "chinese":
translation=translation_ch
elif _preferences.language == "french":
translation=translation_fr
else:
translation=translation_ru
translation_new=translation
# Decompiled by unrpyc: https://github.com/CensoredUsername/unrpyc