我刚刚开始将Google Translate API与此处https://github.com/googleapis/google-cloud-php-translate提供的PHP SDK一起使用,但是我无法确定是否正在使用v2或v3的Translate API。
在我的Cloud Translation API配额信息中心中,所有请求都分组为“ v2和v3字符”。我想知道是使用v2还是v3,因为v3是免费的0-500,000个字符(https://cloud.google.com/translate/pricing)。
例如
$result = $translate->translate('Hello world!', [
'target' => 'fr'
]);
我想知道正在使用哪个版本,以及是否可以设置版本。
答案 0 :(得分:2)
此库目前正在使用v2 as you can see in the github respository
似乎无法使用此客户端库设置任何版本,因为文档显示仅{3}到v3beta可用的官方客户端。也许您可以使用Java, Python and Node
构建自己的客户端库