1# Example for use of GNU gettext. 2# This file is in the public domain. 3# 4# Source code of the Python program. 5 6import gettext 7import os 8 9gettext.textdomain('hello-python') 10gettext.bindtextdomain('hello-python', '@localedir@') 11 12print gettext.gettext("Hello, world!") 13print gettext.gettext("This program is running as process number %(pid)d.") \ 14 % { 'pid': os.getpid() } 15