Cloud Translation V3 Client - Class DetectLanguageResponse (1.12.12)

Reference documentation and code samples for the Cloud Translation V3 Client class DetectLanguageResponse.

The response message for language detection.

Generated from protobuf message google.cloud.translation.v3.DetectLanguageResponse

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ languages array<Google\Cloud\Translate\V3\DetectedLanguage>

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

getLanguages

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLanguages

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

Parameter
NameDescription
var array<Google\Cloud\Translate\V3\DetectedLanguage>
Returns
TypeDescription
$this