GCP Translate Connector
GcpTranslate
Instantiate a GCP Translate object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
credential_file |
str
|
Credential json file |
required |
proxy |
str
|
Proxy address |
''
|
Source code in honeydew/gcp_translate.py
translate_text(text, target_language='en')
Translate text from one language to another language.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text |
str
|
Text to be translated |
required |
target_language |
str
|
Target language. Default: 'en' |
'en'
|
Returns:
Name | Type | Description |
---|---|---|
result |
str
|
Translated text |