1 # -*- coding: utf-8 -*-
3 from __future__
import absolute_import
5 from optparse
import OptionParser
6 from jben
.app
import Application
7 import gettext
, locale
, os
9 def init_windows_locale():
10 """Sets expected environment variables for Windows.
12 If LANG is already specified, this will have no effect.
15 if "LANG" not in os
.environ
:
16 def_locale
, def_encoding
= locale
.getdefaultlocale()
17 os
.environ
["LANG"] = def_locale
20 """Initializes gettext globally."""
21 # This function may be replaced later to support dynamic language switching.
22 gettext
.install("jben", localedir
="locale", unicode=True)
26 op
.set_defaults(interface
="gtk")
27 op
.add_option("-i", "--interface",
28 help=_("Select interface: gtk, console (default: %default)"))
29 return op
.parse_args()
35 (options
, args
) = parse_args()
36 app
= Application(interface
=options
.interface
)
39 if __name__
== "__main__":