I start with localization, but I'm stuck.
Program
#example.py import gettext t = gettext.translation('cn', 'C:\locale', fallback=True) _ = t.ugettext print _('Hello!')
works.
But when trying to use pygettext
python pygettext.py -d cn -o cn.pot example.py
I get the message "invalid syntax:<string>, line 1, pos 18
I tried even the simplest pygettest command:
python pygettext.py example.py
which returns the same error. I tried with other other settings and changes in the program, but this error keeps coming back.
As an example, I used the code http://achilles-keep-moving.blogspot.nl/2011/07/minimal-tutorial-for-python.html
What am I doing wrong?
source share