Created
September 28, 2013 11:19
-
-
Save dkalisch/6741068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YOURFILE.py | |
import gettext # module for the string replacement | |
t = gettext.translation('APPNAME', "./locales") # where does gettext find the language files | |
_ = t.ugettext # definition of strings to be translated | |
name = "Dominik" | |
print _("Hello world") | |
print _("My name is: %s") % name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment