Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lessons.py
diff options
context:
space:
mode:
Diffstat (limited to 'lessons.py')
-rw-r--r--lessons.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lessons.py b/lessons.py
index 2766e0b..35a6922 100644
--- a/lessons.py
+++ b/lessons.py
@@ -66,7 +66,8 @@ class View(gtk.EventBox):
self.show_all()
-_lang = locale.getdefaultlocale()[0].split('_')[0]
+_locale = locale.getdefaultlocale()[0]
+_lang = _locale and _locale.split('_')[0] or 'en'
if not os.path.isdir(theme.path('lessons', _lang)):
logging.info('Cannot find lessons for language %s, thus use en' % _lang)