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