Help with getText lib

Michel Martin <[email protected]>
Newsgroups gmane.comp.python.internationalization
Message-ID <[email protected]>
I have difficulty using getText. In fact, I'm able to create my .po files and my
.mo files. But I'm not able to read/retrieve them using either
"gettext.install(...)" or  "gettext.find(...)".

Does any one have a complete example on how to use getText in a python application?

Here are the details of my work...

I use Windows2000 Pro and Python 2.3
My dev path is c:\dev
My python file is c:\dev\ which contains:
=================
import gettext
gettext.install('dev', 'c:\dev\locale', unicode=1)
print _('Hello world!')
=================

My .mo file is C:\dev\locale\en\LC_MESSAGES\dev.mo which came from
My .po file is C:\dev\locale\en\LC_MESSAGES\dev.po which contains
=================
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: Thu Dec 11 13:34:28 2003\n"
"PO-Revision-Date: 2003-12-11 13:39-0500\n"
"Last-Translator: Mr. Sm:)e <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#
msgid "Hello world!"
msgstr "Does it work?!!!!!!!!"
=================

Please reply with my email address in CC.

Thank you for your help,
Best regards

Michel Martin
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.