mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #789247 (Calibre has a problem with my locale)
This commit is contained in:
parent
6d89193f52
commit
82021c246f
@ -29,8 +29,11 @@ def get_lang():
|
||||
lang = os.environ.get('CALIBRE_OVERRIDE_LANG', lang)
|
||||
if lang is not None:
|
||||
return lang
|
||||
try:
|
||||
lang = locale.getdefaultlocale(['LANGUAGE', 'LC_ALL', 'LC_CTYPE',
|
||||
'LC_MESSAGES', 'LANG'])[0]
|
||||
except:
|
||||
pass # This happens on Ubuntu apparently
|
||||
if lang is None and os.environ.has_key('LANG'): # Needed for OS X
|
||||
try:
|
||||
lang = os.environ['LANG']
|
||||
|
Loading…
x
Reference in New Issue
Block a user