简体   繁体   English

php字符串翻译API

[英]php string translator API

Is there any API which can convert translate my string into another language. 是否有任何API可以将我的字符串转换为另一种语言。

I have string $string="hello world" . 我有字符串$string="hello world" I want to convert only hello world to urdu language. 我想只将hello world转换为urdu语言。

Is there any API or SDK for this? 是否有任何API或SDK?

您可以使用Google翻译

$translate = file_get_contents("https://www.googleapis.com/language/translate/v2?key=YOUR_API_KEY&target=ur&q={$string}");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM