Cloud Translation V3 Client - Class DetectLanguageResponse (1.17.5)

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

Namespace

Google \ Cloud \ Translate \ V3

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