Win2day: Add locale header

This commit is contained in:
Worros 2010-09-19 00:14:50 +08:00
parent 2e6bec5c18
commit 178afa4773

View File

@ -22,6 +22,18 @@ import sys
import datetime import datetime
from HandHistoryConverter import * 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 # Win2day HH Format
class Win2day(HandHistoryConverter): class Win2day(HandHistoryConverter):