198944Sobrien# Example for use of GNU gettext. 298944Sobrien# Copyright (C) 2003 Free Software Foundation, Inc. 3130803Smarcel# This file is in the public domain. 4130803Smarcel# 598944Sobrien# Source code of the Python program. 698944Sobrien 798944Sobrienimport gettext 898944Sobrienimport os 998944Sobrien 1098944Sobriengettext.textdomain('hello-python') 1198944Sobriengettext.bindtextdomain('hello-python', '@localedir@') 1298944Sobrien 1398944Sobrienprint gettext.gettext("Hello, world!") 1498944Sobrienprint gettext.gettext("This program is running as process number %(pid)d.") \ 1598944Sobrien % { 'pid': os.getpid() } 1698944Sobrien