Skip to content

RapidSoftwareSolutions/Marketplace-GoogleTranslate-Package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Translate Package

This package allows you to translates a string of text from one language to another.

How to get apiKey:

  1. Go to the projects page
  2. Select or create a Cloud Platform Console project. Creating project
  3. Enable billing for your project.
  4. Click Continue to enable the Translate API and any related services.
  5. On the Credentials page, get an API key (select Browser key when prompted). Note: If you have an existing API key, you can use that key.
  6. Go to the translate api overview and press the "Enable" button.

Enable API

GoogleTranslate.translate

Translate string from sourceLanguage to targetLanguage

Field Type Description
apiKey string Required: The api key obtained from Google Cloud.
string string Required: The string to translate.
targetLanguage string Required: The ISO 639-1 language code to translate the input to. All supported languages
sourceLanguage string The ISO 639-1 language code the source input is written in. All supported languages

Request example

{
	"apiKey": "XXXXXXX",
	"string": "Hello",
	"sourceLanguage": "en",
	"targetLanguage": "es"
}

Response example

{
	"callback": "success",
	"contextWrites": {
		"#": {
			"to": "Hola"
		}
	}
}

GoogleTranslate.translateAutomatic

Translate string from sourceLanguage to target language automatically

Field Type Description
apiKey string Required: The api key obtained from Google Cloud.
string string Required: The string to translate.
targetLanguage string Required: The ISO 639-1 language code to translate the input to. All supported languages

Request example

{
	"apiKey": "XXXXXXX",
	"string": "Hello",
	"targetLanguage": "es"
}

Response example

{
	"callback": "success",
	"contextWrites": {
		"#": {
			"to": "Hola"
		}
	}
}

GoogleTranslate.detectLanguage

Detect language of string

Field Type Description
apiKey string Required: The api key obtained from Google Cloud.
string string Required: The string to translate.

Request example

{
	"apiKey": "XXXXXXX",
	"string": "Hello",
}

Response example

{
	"callback": "success",
	"contextWrites": {
		"#": {
			"to": "en"
		}
	}
}

About

This package allows to translates a sting of text from one language to another

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published