Browse Source

move language list to i18n.py

283
thomasv 12 years ago
parent
commit
98cce2af0d
  1. 6
      lib/gui_qt.py
  2. 17
      lib/i18n.py

6
lib/gui_qt.py

@ -1574,11 +1574,7 @@ class ElectrumWindow(QMainWindow):
lang_label=QLabel(_('Language') + ':')
grid_ui.addWidget(lang_label , 8, 0)
lang_combo = QComboBox()
languages = {'':_('Default'), 'br':_('Brasilian'), 'cs':_('Czech'), 'de':_('German'),
'eo':_('Esperanto'), 'en':_('English'), 'es':_('Spanish'), 'fr':_('French'),
'it':_('Italian'), 'lv':_('Latvian'), 'nl':_('Dutch'), 'ru':_('Russian'),
'sl':_('Slovenian'), 'vi':_('Vietnamese'), 'zh':_('Chinese')
}
from i18n import languages
lang_combo.addItems(languages.values())
try:
index = languages.keys().index(self.config.get("language",''))

17
lib/i18n.py

@ -34,3 +34,20 @@ def set_language(x):
if x: language = gettext.translation('electrum', LOCALE_DIR, fallback = True, languages=[x])
languages = {
'':_('Default'),
'br':_('Brasilian'),
'cs':_('Czech'),
'de':_('German'),
'eo':_('Esperanto'),
'en':_('English'),
'es':_('Spanish'),
'fr':_('French'),
'it':_('Italian'),
'lv':_('Latvian'),
'nl':_('Dutch'),
'ru':_('Russian'),
'sl':_('Slovenian'),
'vi':_('Vietnamese'),
'zh':_('Chinese')
}

Loading…
Cancel
Save