multilingual support

This commit is contained in:
ingvar1995 2016-04-04 12:20:32 +03:00
parent 1be8040b45
commit 490fa70a76
10 changed files with 775 additions and 34 deletions

View file

@ -48,7 +48,7 @@ class Settings(Singleton, dict):
'tcp_port': 0,
'notifications': True,
'sound_notifications': False,
'language': 'en-en',
'language': 'English',
'save_history': False,
'allow_inline': True,
'allow_auto_accept': False,
@ -60,6 +60,13 @@ class Settings(Singleton, dict):
'calls_sound': True
}
@staticmethod
def supported_languages():
return [
('English', 'en_EN'),
('Russian', 'ru_RU')
]
def save(self):
text = json.dumps(self)
with open(self.path, 'w') as fl: