ask locale module to do the job of detecting LANG; this now works in Windows. thanks Stian for testing

This commit is contained in:
Nikos Kouremenos 2006-02-10 13:18:33 +00:00
parent 9acbb49937
commit c1c48d9210
1 changed files with 5 additions and 4 deletions

View File

@ -27,6 +27,7 @@ import os
import sys
import tempfile
import logging
import locale
import config
from contacts import Contacts
@ -74,11 +75,11 @@ try:
except:
pass
LANG = os.getenv('LANG') # en_US, fr_FR, el_GR etc..
if LANG:
LANG = LANG[:2] # en, fr, el etc..
else:
LANG = locale.getdefaultlocale() # en_US, fr_FR, el_GR etc..
if LANG is None:
LANG = 'en'
else:
LANG = LANG[:2] # en, fr, el etc..
last_message_time = {} # list of time of the latest incomming message
# {acct1: {jid1: time1, jid2: time2}, }