• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

problems using gettext for websites translation

Y

Yvette_WSL

Guest
Hi!

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:
http://www.mandragor.org/tutoriels/gettext/0

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?

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

Thanks.
 
Because of your broken English, I'm having a hard time understanding your question and/or problem, personally.
 
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:
www.sebkhachott.net
www.ammd.net
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!
 
You should probably look at the error logs of each of those virtual hosts to determine if you are getting script errors.
 
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.
 
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
 
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.

Thanks.
 
Up!

I've to say I'm quite sad and helpless, if noone has anything to advice about it.
 
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.

Thanks.
 
Back
Top