tweak local setting

This commit is contained in:
Marcos Pinto 2007-11-21 23:42:35 +00:00
parent d918302e3e
commit 037be4d170
1 changed files with 8 additions and 5 deletions

View File

@ -37,14 +37,17 @@ import common
APP = 'deluge'
DIR = os.path.join(common.INSTALL_PREFIX, 'share', 'locale')
if not common.windows_check():
locale.setlocale(locale.LC_MESSAGES, '')
locale.bindtextdomain(APP, DIR)
locale.textdomain(APP)
if not common.windows_check():
try:
locale.setlocale(locale.LC_MESSAGES, '')
locale.bindtextdomain(APP, DIR)
locale.textdomain(APP)
except:
pass
else:
import gtk.glade
locale.setlocale(locale.LC_ALL, '')
gtk.glade.bindtextdomain(APP,DIR)
gtk.glade.bindtextdomain(APP, DIR)
gtk.glade.textdomain(APP)
gettext.bindtextdomain(APP, DIR)
gettext.textdomain(APP)