gettext support for Linux and Windows

D

Daniele

Dearest,

I have a script that I need to localize.

1. step

import gettext

2. step

_ = gettext.gettext

3. step

gettext.bindtextdomain('nbdutils', (os.getcwd() + '\locale'))

4. step

completed my it.po and copied into

locale/it_IT/LC_MESSAGES/it.mo

Running my apps on windows I can't see any translated string.
Please, help me!
 
T

Thomas Guettler

Am Tue, 12 Oct 2004 20:59:35 +0000 schrieb Daniele:
Dearest,
[cut]

Running my apps on windows I can't see any translated string.
Please, help me!

Hi,

You can put print statements into gettext.py to find out what is
going on.

HTH,
Thomas
 
D

Daniele

Thomas said:
[cut]
You can put print statements into gettext.py to find out what is
going on.

[cut]

On windows, python (latest stable version) I run a script with the following
code statement for gettext:

import gettext

gettext.bindtextdomain('myapp','.\locale')
gettext.textdomain('myapp')

Where I run my script is there a directory "locale" with inside subdirs like
"en" "it_IT" and many more. Under "it_IT" is there a "LC_MESSAGES" and the
relative myapp.mo file. Under Linux the same code run well.. under windows
no: what'z up? I used too the abs path to the dir but nothing change. Any
kind of env variable? I don't know.. and I can't find anything related on
Web.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top