mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-06 08:16:12 +01:00
Fix #2061 (Proper locale support)
This commit is contained in:
parent
56b9ceed10
commit
b1d6b831d9
1 changed files with 3 additions and 2 deletions
|
|
@ -24,7 +24,7 @@
|
|||
_run_once = False
|
||||
if not _run_once:
|
||||
_run_once = True
|
||||
|
||||
|
||||
################################################################################
|
||||
# Setup translations
|
||||
|
||||
|
|
@ -32,7 +32,8 @@ def get_lang():
|
|||
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']
|
||||
|
|
|
|||
Loading…
Reference in a new issue