gettext not working under remote server

Problems with the Windows version of XAMPP, questions, comments, and anything related.

gettext not working under remote server

Postby thosecars82 » 03. June 2010 13:19

Hello
I have a problem.
I use gettext in a website and it seems to work fine under a local xampp installation with PHP 5.3.1
on Windows. However, when I upload the website to a server, it seems as if gettext was not working because I do not see the corresponding translations. The server has PHP 5.2.10 and Apache ver. 2.2.13 (Unix). I have made sure though, that gettext is enabled by looking at phpinfo in the server.

This is part of the code:

putenv("LC_ALL=$locale");
setlocale(LC_ALL, $locale);
bindtextdomain("messages", dirname(__FILE__) . "/locale");
textdomain("messages");

It seems to me this code is fine, but I still think the problem might be related with the path. I do not know how to debug this to verify the path used by bindtextdomain. Does bindtextdomain throw any kind of exception that I can catch with php in case bindtextdomain does not find the path given as dirname(__FILE__) . "/locale"?

Any other suggestion?
Thanks
thosecars82
 
Posts: 3
Joined: 12. April 2010 14:20

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 103 guests