13 lines
248 B
Python
13 lines
248 B
Python
import gettext
|
|
import sys
|
|
|
|
def hello(locale):
|
|
# Set up message catalog access
|
|
t = gettext.translation('%s' % (locale), 'locale', fallback=True)
|
|
_ = t.ugettext
|
|
|
|
s = _(u'Hello World!').encode('utf-8')
|
|
print s
|
|
|
|
|
|
hello(sys.argv[1])
|