Google Slides Editor add-on quickstart
This quickstart creates a Google Slides Editor add-on
that translates selected text in a presentation.
Objectives
- Set up the script.
- Run the script.
Prerequisites
To use this sample, you need the following prerequisites:
- A Google Account (Google Workspace accounts might
require administrator approval).
- A web browser with access to the internet.
Set up the script
- Create a Slides presentation at slides.new.
- Click Extensions > Apps Script.
- Click Untitled project.
- Rename the Apps Script project to Translate Slides and click Rename.
- Next to the
Code.gs
file, click More more_vert
> Rename. Name the file translate
.
- Click Add a file add
> HTML. Name the file
sidebar
.
Replace the contents of each file with the following corresponding code, then
click Save .
Run the script
- In your Slides presentation, reload the page.
- Click Extensions >
Translate Slides
> Start. It might take several seconds
for the add-on menu item to appear.
- When prompted, authorize the add-on.
- Again, click Extensions >
Translate Slides
> Start.
- Add text to your presentation and select it.
- In the add-on, click Translate to replace the
selected text.
Next steps
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 2024-12-19 UTC.
[null,null,["Last updated 2024-12-19 UTC."],[[["This quickstart guide details how to build a Google Slides add-on using Apps Script to translate selected presentation text."],["The add-on allows users to select text within their Google Slides presentation and translate it into various languages such as Arabic, Chinese, English, French, German, Hindi, Japanese, Portuguese, and Spanish."],["To utilize this add-on, users need a Google Account, a web browser, and must follow setup instructions which include creating a Slides presentation, enabling Apps Script, and pasting provided code into designated script files."],["Users can run the add-on by reloading their Slides presentation, authorizing the add-on, and selecting the text they wish to translate before clicking the \"Translate\" button in the add-on sidebar."]]],[]]