我想使用这个php-language-api,我认为它很棒,但是只有文本,它不能使用html文本(请参阅
$text = htmlspecialchars('<a href="test.php">test.php</a>');
$str = Google_Translate_API::translate($text, 'en', 'ar');
或
$text = '<a href="test.php">test.php</a>';
$str = Google_Translate_API::translate($text, 'en', 'ar');
在这两种情况下,它的效果都不好
发布于 2010-07-16 17:03:06
您是否尝试过:
$text = '<a href="test.php">test.php</a>';
$str = Google_Translate_API::translate(strip_tags($text), 'en', 'ar');
https://stackoverflow.com/questions/3263147
复制相似问题