From 178afa47739e54034b1c7241fb13a36193a57c28 Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 19 Sep 2010 00:14:50 +0800 Subject: [PATCH] Win2day: Add locale header --- pyfpdb/Win2dayToFpdb.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pyfpdb/Win2dayToFpdb.py b/pyfpdb/Win2dayToFpdb.py index 47891f0f..09492228 100755 --- a/pyfpdb/Win2dayToFpdb.py +++ b/pyfpdb/Win2dayToFpdb.py @@ -22,6 +22,18 @@ import sys import datetime from HandHistoryConverter import * +import locale +lang=locale.getdefaultlocale()[0][0:2] +if lang=="en": + def _(string): return string +else: + import gettext + try: + trans = gettext.translation("fpdb", localedir="locale", languages=[lang]) + trans.install() + except IOError: + def _(string): return string + # Win2day HH Format class Win2day(HandHistoryConverter):