Fix #2061 (Proper locale support)

This commit is contained in:
Kovid Goyal 2009-04-07 09:33:26 -07:00
parent 56b9ceed10
commit b1d6b831d9

View File

@ -32,7 +32,8 @@ if not _run_once:
lang = prefs['language']
if lang is not None:
return lang
lang = locale.getdefaultlocale()[0]
lang = locale.getdefaultlocale(['LANGUAGE', 'LC_ALL', 'LC_CTYPE',
'LC_MESSAGES', 'LANG'])[0]
if lang is None and os.environ.has_key('LANG'): # Needed for OS X
try:
lang = os.environ['LANG']