Reference documentation and code samples for the Cloud Translation V3 Client class RomanizeTextRequest.
The request message for synchronous romanization.
Generated from protobuf messagegoogle.cloud.translation.v3.RomanizeTextRequest
Namespace
Google \ Cloud \ Translate \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ parent
string
Required. Project or location to make a call. Must refer to a caller's project. Format:projects/{project-number-or-id}/locations/{location-id}orprojects/{project-number-or-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{project-number-or-id}.
↳ contents
array
Required. The content of the input in string format.
↳ source_language_code
string
Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". Supported language codes are listed inLanguage Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.
getParent
Required. Project or location to make a call. Must refer to a caller's
project.
Format:projects/{project-number-or-id}/locations/{location-id}orprojects/{project-number-or-id}.
For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{project-number-or-id}.
Returns
Type
Description
string
setParent
Required. Project or location to make a call. Must refer to a caller's
project.
Format:projects/{project-number-or-id}/locations/{location-id}orprojects/{project-number-or-id}.
For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{project-number-or-id}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getContents
Required. The content of the input in string format.
Required. The content of the input in string format.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getSourceLanguageCode
Optional. The ISO-639 language code of the input text if
known, for example, "hi" or "zh". Supported language codes are
listed inLanguage
Support. If the
source language isn't specified, the API attempts to identify the source
language automatically and returns the source language for each content in
the response.
Returns
Type
Description
string
setSourceLanguageCode
Optional. The ISO-639 language code of the input text if
known, for example, "hi" or "zh". Supported language codes are
listed inLanguage
Support. If the
source language isn't specified, the API attempts to identify the source
language automatically and returns the source language for each content in
the response.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
static::build
Parameters
Name
Description
parent
string
Required. Project or location to make a call. Must refer to a caller's
project.
For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{project-number-or-id}. Please seeTranslationServiceClient::locationName()for help formatting this field.
contents
string[]
Required. The content of the input in string format.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Translation V3 Client - Class RomanizeTextRequest (2.0.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.3 (latest)](/php/docs/reference/cloud-translate/latest/V3.RomanizeTextRequest)\n- [2.0.2](/php/docs/reference/cloud-translate/2.0.2/V3.RomanizeTextRequest)\n- [1.21.0](/php/docs/reference/cloud-translate/1.21.0/V3.RomanizeTextRequest)\n- [1.20.2](/php/docs/reference/cloud-translate/1.20.2/V3.RomanizeTextRequest)\n- [1.19.0](/php/docs/reference/cloud-translate/1.19.0/V3.RomanizeTextRequest)\n- [1.18.1](/php/docs/reference/cloud-translate/1.18.1/V3.RomanizeTextRequest)\n- [1.17.7](/php/docs/reference/cloud-translate/1.17.7/V3.RomanizeTextRequest)\n- [1.16.0](/php/docs/reference/cloud-translate/1.16.0/V3.RomanizeTextRequest)\n- [1.15.4](/php/docs/reference/cloud-translate/1.15.4/V3.RomanizeTextRequest)\n- [1.14.3](/php/docs/reference/cloud-translate/1.14.3/V3.RomanizeTextRequest)\n- [1.13.3](/php/docs/reference/cloud-translate/1.13.3/V3.RomanizeTextRequest)\n- [1.12.12](/php/docs/reference/cloud-translate/1.12.12/V3.RomanizeTextRequest) \nReference documentation and code samples for the Cloud Translation V3 Client class RomanizeTextRequest.\n\nThe request message for synchronous romanization.\n\nGenerated from protobuf message `google.cloud.translation.v3.RomanizeTextRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Translate \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getParent\n\nRequired. Project or location to make a call. Must refer to a caller's\nproject.\n\nFormat: `projects/{project-number-or-id}/locations/{location-id}` or\n`projects/{project-number-or-id}`.\nFor global calls, use `projects/{project-number-or-id}/locations/global` or\n`projects/{project-number-or-id}`.\n\n### setParent\n\nRequired. Project or location to make a call. Must refer to a caller's\nproject.\n\nFormat: `projects/{project-number-or-id}/locations/{location-id}` or\n`projects/{project-number-or-id}`.\nFor global calls, use `projects/{project-number-or-id}/locations/global` or\n`projects/{project-number-or-id}`.\n\n### getContents\n\nRequired. The content of the input in string format.\n\n### setContents\n\nRequired. The content of the input in string format.\n\n### getSourceLanguageCode\n\nOptional. The ISO-639 language code of the input text if\nknown, for example, \"hi\" or \"zh\". Supported language codes are\nlisted in [Language\nSupport](https://cloud.google.com/translate/docs/languages#roman). If the\nsource language isn't specified, the API attempts to identify the source\nlanguage automatically and returns the source language for each content in\nthe response.\n\n### setSourceLanguageCode\n\nOptional. The ISO-639 language code of the input text if\nknown, for example, \"hi\" or \"zh\". Supported language codes are\nlisted in [Language\nSupport](https://cloud.google.com/translate/docs/languages#roman). If the\nsource language isn't specified, the API attempts to identify the source\nlanguage automatically and returns the source language for each content in\nthe response.\n\n### static::build"]]