Commit fcdf02f5 authored by Paolo Dongilli's avatar Paolo Dongilli
Browse files

fallback to 'it_IT.utf8' when locale is not set

parent 37bdd72f
......@@ -35,7 +35,10 @@ class App(tk.Frame):
)
self.text.pack(side="top")
cur_loc = locale.getlocale()
self.chosen_locale.set(cur_loc[0]+'.'+cur_loc[1])
if cur_loc[0] is None or cur_loc[0] is None:
self.chosen_locale.set('it_IT.utf8')
else:
self.chosen_locale.set(cur_loc[0]+'.'+cur_loc[1])
self.locale_menu = tk.OptionMenu(self, self.chosen_locale, *self.locales)
self.locale_menu.pack(side="top")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment