Language Service Stay organized with collections Save and categorize content based on your preferences.
AI-generated Key Takeaways
The Language service enables scripts to automatically translate text.
The
LanguageAppclass provides methods for translating text.The
translatemethod is used to translate text from a source language to a target language.
Language
This service allows scripts to automatically translate text.
//Thecodebelowwillwrite'Esta es una prueba'tothelog.varspanish=LanguageApp.translate('This is a test','en','es');Logger.log(spanish);Classes
| Name | Brief description |
|---|---|
Language | The Language service provides scripts a way to compute automatic translations of text. |
LanguageApp
Methods
| Method | Return type | Brief description |
|---|---|---|
translate(text, sourceLanguage, targetLanguage) | String | Automatically translates some text from a source language to a destination language. |
translate(text, sourceLanguage, targetLanguage, advancedArgs) | String | Automatically translates some text from a source language to a destination language. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-02 UTC.