Page 1 of 1

Echo and language

Posted: Sun Mar 05, 2006 7:28 pm
by legoman69
Hi again,
How can I use different languages with the echo command?
For example if I write

Code: Select all

echo "something in Greek language";
it doesn't give the output in Greek..
Any help?

thx

Posted: Sun Mar 05, 2006 9:07 pm
by neophyte
When there is something written in Greek it will be Greek:

echo κλέπτης

:wink:

Posted: Sun Mar 05, 2006 9:43 pm
by nickman013
What do you mean it doesnt echo. It should echo everything between the quotes if there is somthing there.

Posted: Sun Mar 05, 2006 11:05 pm
by feyd
gettext() maybe? PHP won't magically translate your output to another language by default.

I think

Posted: Mon Mar 06, 2006 5:59 am
by hcy
when you write "echo "something in Greek language"; " if php can give the output in Greek.. ,the php mustn't php,it must a man or a woman.

Re: I think

Posted: Mon Mar 06, 2006 7:09 am
by Chris Corbyn
hcy wrote:when you write "echo "something in Greek language"; " if php can give the output in Greek.. ,the php mustn't php,it must a man or a woman.
Stop this now.... You're contributing absolute junk to all our threads.

Posted: Mon Mar 06, 2006 7:58 pm
by nickman013
So basically you want a translator? You would need a database with every single word. Or you can just write the words in greek.

Posted: Tue Mar 07, 2006 2:52 am
by shiznatix
every single word does not work because of crazy grammer in some langauges. what i have always done is just make a giant array of all the phrases that are used and just call a function to it like lang('I translated this') and then in the function lang just base what language you are going to use on what their session is.