By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,053 Members | 1,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,053 IT Pros & Developers. It's quick & easy.

setlocale problem

P: n/a
jim
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
Feb 1 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.