Send feedback
Class v3.TranslationServiceClient (6.1.0) Stay organized with collections
Save and categorize content based on your preferences.
Version 6.1.0 keyboard_arrow_down
Provides natural language translation operations. v3
Package
@google-cloud/translate!
Constructors
(constructor)(opts)
constructor
(
opts
?:
ClientOptions
);
Construct an instance of TranslationServiceClient.
Parameter
Properties
apiEndpoint
static
get
apiEndpoint
()
:
string
;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
auth
:
gax
.
GoogleAuth
;
Property Value
descriptors
descriptors
:
Descriptors
;
Property Value
innerApiCalls
innerApiCalls
:
{
[
name
:
string
]
:
Function
;
};
Property Value
operationsClient
operationsClient
:
gax
.
OperationsClient
;
Property Value
pathTemplates
pathTemplates
:
{
[
name
:
string
]
:
gax
.
PathTemplate
;
};
Property Value
port
static
get
port
()
:
number
;
The port for this API service.
Property Value
scopes
static
get
scopes
()
:
string
[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
servicePath
static
get
servicePath
()
:
string
;
The DNS address for this API service.
Property Value
translationServiceStub
translationServiceStub
?:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
Property Value
Methods
batchTranslateText(request, options)
batchTranslateText
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IBatchTranslateTextRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
IBatchTranslateResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
IBatchTranslateMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IBatchTranslateTextRequest
options
CallOptions
Returns
batchTranslateText(request, options, callback)
batchTranslateText
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IBatchTranslateTextRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
IBatchTranslateResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
IBatchTranslateMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IBatchTranslateTextRequest
options
CallOptions
callback
Callback
< LROperation
<protos. google.cloud.translation.v3.IBatchTranslateResponse
, protos. google.cloud.translation.v3.IBatchTranslateMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
batchTranslateText(request, callback)
batchTranslateText
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IBatchTranslateTextRequest
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
IBatchTranslateResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
IBatchTranslateMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IBatchTranslateTextRequest
callback
Callback
< LROperation
<protos. google.cloud.translation.v3.IBatchTranslateResponse
, protos. google.cloud.translation.v3.IBatchTranslateMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
checkBatchTranslateTextProgress(name)
checkBatchTranslateTextProgress
(
name
:
string
)
:
Promise<LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
BatchTranslateResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
BatchTranslateMetadata
>> ;
Check the status of the long running operation returned by batchTranslateText()
.
Parameter Name
Description
name
string
The operation name that will be passed.
Returns Type
Description
Promise
< LROperation
<protos. google.cloud.translation.v3.BatchTranslateResponse
, protos. google.cloud.translation.v3.BatchTranslateMetadata
>>
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
checkCreateGlossaryProgress(name)
checkCreateGlossaryProgress
(
name
:
string
)
:
Promise<LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
Glossary
,
protos
.
google
.
cloud
.
translation
.
v3
.
CreateGlossaryMetadata
>> ;
Check the status of the long running operation returned by createGlossary()
.
Parameter Name
Description
name
string
The operation name that will be passed.
Returns Type
Description
Promise
< LROperation
<protos. google.cloud.translation.v3.Glossary
, protos. google.cloud.translation.v3.CreateGlossaryMetadata
>>
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
checkDeleteGlossaryProgress(name)
checkDeleteGlossaryProgress
(
name
:
string
)
:
Promise<LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
DeleteGlossaryResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
DeleteGlossaryMetadata
>> ;
Check the status of the long running operation returned by deleteGlossary()
.
Parameter Name
Description
name
string
The operation name that will be passed.
Returns Type
Description
Promise
< LROperation
<protos. google.cloud.translation.v3.DeleteGlossaryResponse
, protos. google.cloud.translation.v3.DeleteGlossaryMetadata
>>
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
close()
close
()
:
Promise<void>
;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns Type
Description
Promise
<void>
{Promise} A promise that resolves when the client is closed.
createGlossary(request, options)
createGlossary
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
ICreateGlossaryRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
,
protos
.
google
.
cloud
.
translation
.
v3
.
ICreateGlossaryMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.translation.v3.ICreateGlossaryRequest
options
CallOptions
Returns
createGlossary(request, options, callback)
createGlossary
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
ICreateGlossaryRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
,
protos
.
google
.
cloud
.
translation
.
v3
.
ICreateGlossaryMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.ICreateGlossaryRequest
options
CallOptions
callback
Callback
< LROperation
<protos. google.cloud.translation.v3.IGlossary
, protos. google.cloud.translation.v3.ICreateGlossaryMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
createGlossary(request, callback)
createGlossary
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
ICreateGlossaryRequest
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
,
protos
.
google
.
cloud
.
translation
.
v3
.
ICreateGlossaryMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.ICreateGlossaryRequest
callback
Callback
< LROperation
<protos. google.cloud.translation.v3.IGlossary
, protos. google.cloud.translation.v3.ICreateGlossaryMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
deleteGlossary(request, options)
deleteGlossary
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IDeleteGlossaryRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
IDeleteGlossaryResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
IDeleteGlossaryMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IDeleteGlossaryRequest
options
CallOptions
Returns
deleteGlossary(request, options, callback)
deleteGlossary
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IDeleteGlossaryRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
IDeleteGlossaryResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
IDeleteGlossaryMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IDeleteGlossaryRequest
options
CallOptions
callback
Callback
< LROperation
<protos. google.cloud.translation.v3.IDeleteGlossaryResponse
, protos. google.cloud.translation.v3.IDeleteGlossaryMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
deleteGlossary(request, callback)
deleteGlossary
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IDeleteGlossaryRequest
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
translation
.
v3
.
IDeleteGlossaryResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
IDeleteGlossaryMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IDeleteGlossaryRequest
callback
Callback
< LROperation
<protos. google.cloud.translation.v3.IDeleteGlossaryResponse
, protos. google.cloud.translation.v3.IDeleteGlossaryMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
detectLanguage(request, options)
detectLanguage
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IDetectLanguageRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
translation
.
v3
.
IDetectLanguageResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
IDetectLanguageRequest
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IDetectLanguageRequest
options
CallOptions
Returns
detectLanguage(request, options, callback)
detectLanguage
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IDetectLanguageRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
translation
.
v3
.
IDetectLanguageResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
IDetectLanguageRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IDetectLanguageRequest
options
CallOptions
callback
Callback
<protos. google.cloud.translation.v3.IDetectLanguageResponse
, protos. google.cloud.translation.v3.IDetectLanguageRequest
| null | undefined, {} | null | undefined>
Returns
detectLanguage(request, callback)
detectLanguage
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IDetectLanguageRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
translation
.
v3
.
IDetectLanguageResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
IDetectLanguageRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IDetectLanguageRequest
callback
Callback
<protos. google.cloud.translation.v3.IDetectLanguageResponse
, protos. google.cloud.translation.v3.IDetectLanguageRequest
| null | undefined, {} | null | undefined>
Returns
getGlossary(request, options)
getGlossary
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IGetGlossaryRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
,
protos
.
google
.
cloud
.
translation
.
v3
.
IGetGlossaryRequest
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IGetGlossaryRequest
options
CallOptions
Returns
getGlossary(request, options, callback)
getGlossary
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IGetGlossaryRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
,
protos
.
google
.
cloud
.
translation
.
v3
.
IGetGlossaryRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IGetGlossaryRequest
options
CallOptions
callback
Callback
<protos. google.cloud.translation.v3.IGlossary
, protos. google.cloud.translation.v3.IGetGlossaryRequest
| null | undefined, {} | null | undefined>
Returns
getGlossary(request, callback)
getGlossary
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IGetGlossaryRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
,
protos
.
google
.
cloud
.
translation
.
v3
.
IGetGlossaryRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IGetGlossaryRequest
callback
Callback
<protos. google.cloud.translation.v3.IGlossary
, protos. google.cloud.translation.v3.IGetGlossaryRequest
| null | undefined, {} | null | undefined>
Returns
getProjectId()
getProjectId
()
:
Promise<string>
;
Returns
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
Parameter Name
Description
callback
Callback
<string, undefined, undefined>
Returns
getSupportedLanguages(request, options)
getSupportedLanguages
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IGetSupportedLanguagesRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
translation
.
v3
.
ISupportedLanguages
,
(
protos
.
google
.
cloud
.
translation
.
v3
.
IGetSupportedLanguagesRequest
|
undefined
),
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IGetSupportedLanguagesRequest
options
CallOptions
Returns
getSupportedLanguages(request, options, callback)
getSupportedLanguages
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IGetSupportedLanguagesRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
translation
.
v3
.
ISupportedLanguages
,
protos
.
google
.
cloud
.
translation
.
v3
.
IGetSupportedLanguagesRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IGetSupportedLanguagesRequest
options
CallOptions
callback
Callback
<protos. google.cloud.translation.v3.ISupportedLanguages
, protos. google.cloud.translation.v3.IGetSupportedLanguagesRequest
| null | undefined, {} | null | undefined>
Returns
getSupportedLanguages(request, callback)
getSupportedLanguages
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IGetSupportedLanguagesRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
translation
.
v3
.
ISupportedLanguages
,
protos
.
google
.
cloud
.
translation
.
v3
.
IGetSupportedLanguagesRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IGetSupportedLanguagesRequest
callback
Callback
<protos. google.cloud.translation.v3.ISupportedLanguages
, protos. google.cloud.translation.v3.IGetSupportedLanguagesRequest
| null | undefined, {} | null | undefined>
Returns
glossaryPath(project, location, glossary)
glossaryPath
(
project
:
string
,
location
:
string
,
glossary
:
string
)
:
string
;
Return a fully-qualified glossary resource name string.
Parameters
Returns Type
Description
string
{string} Resource name string.
initialize()
initialize
()
:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns Type
Description
Promise
<{
[name: string]: Function
;
}>
{Promise} A promise that resolves to an authenticated service stub.
listGlossaries(request, options)
listGlossaries
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
[],
protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesRequest
|
null
,
protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesResponse
]>;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IListGlossariesRequest
options
CallOptions
Returns
listGlossaries(request, options, callback)
listGlossaries
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesRequest
,
protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IListGlossariesRequest
options
CallOptions
callback
PaginationCallback
<protos. google.cloud.translation.v3.IListGlossariesRequest
, protos. google.cloud.translation.v3.IListGlossariesResponse
| null | undefined, protos. google.cloud.translation.v3.IGlossary
>
Returns
listGlossaries(request, callback)
listGlossaries
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesRequest
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesRequest
,
protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.IListGlossariesRequest
callback
PaginationCallback
<protos. google.cloud.translation.v3.IListGlossariesRequest
, protos. google.cloud.translation.v3.IListGlossariesResponse
| null | undefined, protos. google.cloud.translation.v3.IGlossary
>
Returns
listGlossariesAsync(request, options)
listGlossariesAsync
(
request
?:
protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
cloud
.
translation
.
v3
.
IGlossary
> ;
Equivalent to listGlossaries
, but returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
Parameters Name
Description
request
protos. google.cloud.translation.v3.IListGlossariesRequest
The request object that will be sent.
options
CallOptions
Call options. See CallOptions
for more details.
Returns Type
Description
AsyncIterable
<protos. google.cloud.translation.v3.IGlossary
>
{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Glossary]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
listGlossariesStream(request, options)
listGlossariesStream
(
request
?:
protos
.
google
.
cloud
.
translation
.
v3
.
IListGlossariesRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters Name
Description
request
protos. google.cloud.translation.v3.IListGlossariesRequest
The request object that will be sent.
options
CallOptions
Call options. See CallOptions
for more details.
Returns Type
Description
Transform
{Stream} An object stream which emits an object representing [Glossary] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listGlossariesAsync()
method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
locationPath(project, location)
locationPath
(
project
:
string
,
location
:
string
)
:
string
;
Return a fully-qualified location resource name string.
Parameters
Returns Type
Description
string
{string} Resource name string.
matchGlossaryFromGlossaryName(glossaryName)
matchGlossaryFromGlossaryName
(
glossaryName
:
string
)
:
string
|
number
;
Parse the glossary from Glossary resource.
Parameter Name
Description
glossaryName
string
A fully-qualified path representing Glossary resource.
Returns Type
Description
string | number
{string} A string representing the glossary.
matchLocationFromGlossaryName(glossaryName)
matchLocationFromGlossaryName
(
glossaryName
:
string
)
:
string
|
number
;
Parse the location from Glossary resource.
Parameter Name
Description
glossaryName
string
A fully-qualified path representing Glossary resource.
Returns Type
Description
string | number
{string} A string representing the location.
matchLocationFromLocationName(locationName)
matchLocationFromLocationName
(
locationName
:
string
)
:
string
|
number
;
Parse the location from Location resource.
Parameter Name
Description
locationName
string
A fully-qualified path representing Location resource.
Returns Type
Description
string | number
{string} A string representing the location.
matchProjectFromGlossaryName(glossaryName)
matchProjectFromGlossaryName
(
glossaryName
:
string
)
:
string
|
number
;
Parse the project from Glossary resource.
Parameter Name
Description
glossaryName
string
A fully-qualified path representing Glossary resource.
Returns Type
Description
string | number
{string} A string representing the project.
matchProjectFromLocationName(locationName)
matchProjectFromLocationName
(
locationName
:
string
)
:
string
|
number
;
Parse the project from Location resource.
Parameter Name
Description
locationName
string
A fully-qualified path representing Location resource.
Returns Type
Description
string | number
{string} A string representing the project.
translateText(request, options)
translateText
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
ITranslateTextRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
translation
.
v3
.
ITranslateTextResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
ITranslateTextRequest
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.translation.v3.ITranslateTextRequest
options
CallOptions
Returns
translateText(request, options, callback)
translateText
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
ITranslateTextRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
translation
.
v3
.
ITranslateTextResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
ITranslateTextRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.ITranslateTextRequest
options
CallOptions
callback
Callback
<protos. google.cloud.translation.v3.ITranslateTextResponse
, protos. google.cloud.translation.v3.ITranslateTextRequest
| null | undefined, {} | null | undefined>
Returns
translateText(request, callback)
translateText
(
request
:
protos
.
google
.
cloud
.
translation
.
v3
.
ITranslateTextRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
translation
.
v3
.
ITranslateTextResponse
,
protos
.
google
.
cloud
.
translation
.
v3
.
ITranslateTextRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.translation.v3.ITranslateTextRequest
callback
Callback
<protos. google.cloud.translation.v3.ITranslateTextResponse
, protos. google.cloud.translation.v3.ITranslateTextRequest
| null | undefined, {} | null | undefined>
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
Need to tell us more?
[[["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,[]]