Changeset 1171 for pykota/trunk
- Timestamp:
- 10/24/03 23:52:46 (21 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r1152 r1171 22 22 # 23 23 # $Log$ 24 # Revision 1.54 2003/10/24 21:52:46 jalet 25 # Now can force language when coming from CGI script. 26 # 24 27 # Revision 1.53 2003/10/08 21:41:38 jalet 25 28 # External policies for printers works ! … … 235 238 class PyKotaTool : 236 239 """Base class for all PyKota command line tools.""" 237 def __init__(self, doc="PyKota %s (c) 2003 %s" % (version.__version__, version.__author__)) :240 def __init__(self, lang=None, doc="PyKota %s (c) 2003 %s" % (version.__version__, version.__author__)) : 238 241 """Initializes the command line tool.""" 239 242 # locale stuff 240 243 try : 241 locale.setlocale(locale.LC_ALL, "")244 locale.setlocale(locale.LC_ALL, lang) 242 245 gettext.install("pykota") 243 246 except (locale.Error, IOError) : 244 247 gettext.NullTranslations().install() 248 sys.stderr.write("PyKota : Error while loading translations\n") 245 249 246 250 # pykota specific stuff