From b1d6b831d98d9e1e93658fc4de13db5ac7526bfe Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 7 Apr 2009 09:33:26 -0700 Subject: [PATCH] Fix #2061 (Proper locale support) --- src/calibre/startup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/startup.py b/src/calibre/startup.py index 6cf155792e..52648a20a0 100644 --- a/src/calibre/startup.py +++ b/src/calibre/startup.py @@ -24,7 +24,7 @@ from calibre.translations.msgfmt import make _run_once = False if not _run_once: _run_once = True - + ################################################################################ # Setup translations @@ -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']