Win2day: Add locale header
This commit is contained in:
parent
2e6bec5c18
commit
178afa4773
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user