gettext support for Linux and Windows

Discussion in 'Python' started by Daniele, Oct 12, 2004.

  1. Daniele

    Daniele Guest

    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!
    --
    Daniele
     
    Daniele, Oct 12, 2004
    #1
    1. Advertising

  2. 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
     
    Thomas Guettler, Oct 13, 2004
    #2
    1. Advertising

  3. Daniele

    Daniele Guest

    Thomas Guettler wrote:

    > [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.


    --
    Daniele
     
    Daniele, Oct 14, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. StasZ

    gettext in windows

    StasZ, Feb 5, 2004, in forum: Python
    Replies:
    2
    Views:
    1,910
    StasZ
    Feb 6, 2004
  2. =?iso-8859-1?B?aWFuYXLp?=

    gettext errors with wxPython in linux

    =?iso-8859-1?B?aWFuYXLp?=, May 17, 2006, in forum: Python
    Replies:
    0
    Views:
    295
    =?iso-8859-1?B?aWFuYXLp?=
    May 17, 2006
  3. gettext on Windows

    , Oct 28, 2006, in forum: Python
    Replies:
    7
    Views:
    528
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Oct 28, 2006
  4. ZeeGeek
    Replies:
    6
    Views:
    723
    ZeeGeek
    May 21, 2008
  5. prachi
    Replies:
    0
    Views:
    660
    prachi
    Jan 17, 2009
Loading...

Share This Page