Hi I want to auto detect the language and translate it to english,

im using it in an interface,

I tried google API translate code but it is not translating the value in variable


Can any one plz try


Eg:
I want to translate the sentence in $x to English

<html>

<?php


$x='Est-ce que vous pouvez lécrire?';
echo $x;


?>


</html>

Recommended Answers

All 4 Replies

Can't you just use a translator or something>? Copy and paste the sentence in google and look for its translation.

so each time i should copy from my page 2 google translator and paste it right,
is there any way so that i can see it on the same page

What is the problem using Googles API's? Can you post the google api code that you wrote to translate?

@rahulroshan.. Sorry buddy. I must have misunderstood what you wanted to do. I thought you just wanted to translate only the string in that variable.

My apologies for any inconvenience, buddy.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.