views:

22

answers:

1

i want to use this php-language-api i think it is great but with text only it can not wrok with html text see

$text = htmlspecialchars('<a href="test.php">test.php</a>');
$str = Google_Translate_API::translate($text, 'en', 'ar');

or

$text = '<a href="test.php">test.php</a>';
$str = Google_Translate_API::translate($text, 'en', 'ar');

in the two cases its not work good

A: 

have you tried:

$text = '<a href="test.php">test.php</a>';
$str = Google_Translate_API::translate(strip_tags($text), 'en', 'ar');
seengee
yes i know but it will appear without html
moustafa
right okay, think a downvote is harsh though since you didnt specify that
seengee
sorry my friend
moustafa
i will use google from url
moustafa