Language Service

  • The Language service enables scripts to automatically translate text.

  • TheLanguageApp class provides methods for translating text.

  • Thetranslate method 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

NameBrief description
LanguageAppThe Language service provides scripts a way to compute automatic translations of text.

LanguageApp

Methods

MethodReturn typeBrief description
translate(text, sourceLanguage, targetLanguage)StringAutomatically translates some text from a source language to a destination language.
translate(text, sourceLanguage, targetLanguage, advancedArgs)StringAutomatically 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.