Connecting Tech Pros Worldwide Help | Site Map

setlocale problem

jim
Guest
 
Posts: n/a
#1: Feb 1 '07
Hello,

I've got a problem with the setlocale function.

This is my code (test.php) :
------------------
echo setlocale(LC_ALL, 'fr');
echo "<br />" ;
echo bindtextdomain('fr-FR', './lang') ;
echo "<br />" ;
echo textdomain('fr-FR') ;
echo "<hr />" ;
echo gettext('test') ;
------------------

in my PO file, I have (lang/fr/LC_MESSAGES/fr-FR.po) :
------------------
msgid "test"
msgstr "voici un test"
------------------

It works perfectly on my machine under windows and this is what I get :
------------------
French_France.1252
C:\websites\mywebsite\test\gettext\lang
fr-FR
voici un test
------------------

My problem is that it doesn't work on a website hosted with Linux. This is
what I get :
------------------
(an empty line)
/mnt/120/sdb/d/c/webshell/gettext/lang
fr-FR
test
------------------

I can't get it done properly. Can you help me please ?

Thank you in advance,

--
jim


Closed Thread