PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
legoman69
Forum Newbie
Posts: 13 Joined: Fri Feb 24, 2006 10:34 am
Post
by legoman69 » Sun Mar 05, 2006 7:28 pm
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
neophyte
DevNet Resident
Posts: 1537 Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota
Post
by neophyte » Sun Mar 05, 2006 9:07 pm
When there is something written in Greek it will be Greek:
echo κλέπτης
Last edited by
neophyte on Sun Mar 05, 2006 10:18 pm, edited 1 time in total.
nickman013
Forum Regular
Posts: 764 Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York
Post
by nickman013 » Sun Mar 05, 2006 9:43 pm
What do you mean it doesnt echo. It should echo everything between the quotes if there is somthing there.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Mar 05, 2006 11:05 pm
gettext() maybe? PHP won't magically translate your output to another language by default.
hcy
Forum Newbie
Posts: 3 Joined: Sun Mar 05, 2006 11:59 pm
Post
by hcy » Mon Mar 06, 2006 5:59 am
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.
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Mon Mar 06, 2006 7:09 am
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.
nickman013
Forum Regular
Posts: 764 Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York
Post
by nickman013 » Mon Mar 06, 2006 7:58 pm
So basically you want a translator? You would need a database with every single word. Or you can just write the words in greek.
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Tue Mar 07, 2006 2:52 am
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.