1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

problems using gettext for websites translation

Discussion in 'Plesk for Linux - 8.x and Older' started by Yvette_WSL, Aug 4, 2007.

  1. Yvette_WSL

    Yvette_WSL Guest


    I'm Yvette, new here. I'm a member of the admin staff of WebSansLimit, a free web hoster. We've recently change our server and now we work with Plesk 8.1.0 on a Debian system.

    Some websites hosted by our server use gettext for the translation and multi-linguism of their contents, following the guidelines of this tutorial:

    This worked perfectly til we run Plesk.

    We've been trying some things, cause there were some env variables which couldn't be set (safe-mode), so we allow now:
    PHP_, LANG, LC_
    but, still, it's not going to work. Translation just doesn't translate!

    We've been thinking of the path to the message.mo files, but, none of our attempts of changing bindtextdomain did lead to anything.

    Has someone an idea about it?

  2. Yvette_WSL

    Yvette_WSL Guest

    Hum, as there is no answer, perhaps my demand was not understandable, or I didn't give enough details.
    Don't hesitate to tell me if you want to know more.

  3. rsumner

    rsumner Guest

    Because of your broken English, I'm having a hard time understanding your question and/or problem, personally.
  4. Yvette_WSL

    Yvette_WSL Guest

    I'm sorry, I'm not used to speak English for such technical things, actually.
    But reading my first post, I think I was quite tired as I wrote it ;)

    I'm gonna try to explain more fluently.

    The server @ websanslimit.net is running with Plesk 8.1.0.
    There are multi-lingual websites on this server which use gettext for the translation of their webpage's content (following this tutorial http://www.mandragor.org/tutoriels/gettext/0).
    Here are two examples of such websites:
    Both of them use English as "default language", but if you choose their French versions (there are little icons at the very top of the page), the content is still in English.
    However, the putenv function works fine, as you may see looking for the title-logos in www.sebkhachott.net, for example.

    We've been trying several things to fix this problem, but none did work:
    - as php is in safe-mode, we've been allowing putenv fore several several more variables: PHP_, LANG, LC_
    - as there are both httpdocs (for http://) and httpsdocs (for connexion over ssl) directories, we've been trying to use absolute path in the bindtextdomain function. We also tried several way of writing the path to the text domain.
    - lastly, we've been thinking about the locales package, but it didn't seem to be installed.

    And, despite of all this attempts, we're still unable to use gettext properly on this server.

    Note 1: gettext is enabled (phpinfo said)
    Note 2: the way the two websites use gettext to translate their pages worked fine on the previous server, which wasn't running with Plesk.

    Hope it's better this way!
  5. rsumner

    rsumner Guest

    You should probably look at the error logs of each of those virtual hosts to determine if you are getting script errors.
  6. Yvette_WSL

    Yvette_WSL Guest

    Nothing about gettext or messages.mo (the translation files) in error.log, not more in xferlog regular, not even in access.log.
    Not a single line.
  7. Yvette_WSL

    Yvette_WSL Guest

    Perhaps shall I precise:

    I've made searches in the error.log, xferlog regular and access.log files of those vhosts.
    My searches was with the following keywords

    - messages
    - messages.mo
    - gettext
    - bindtexdomain
    - texdomain
  8. Yvette_WSL

    Yvette_WSL Guest

    Er, it seems this problem is quite complicated, actually.
    Any route to follow is welcome, we really don't have any idea about what to do.

  9. Yvette_WSL

    Yvette_WSL Guest


    I've to say I'm quite sad and helpless, if noone has anything to advice about it.
  10. Yvette_WSL

    Yvette_WSL Guest

    Hi !

    My problem isn't fixed yet, and I begin to desperate about it. It's quite annoying to have multilingual websites running in English only, you know. I'd be really glad if someone could take an eye on it.