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