Szybki start z dodatkiem do Edytującego Google Slides
Ten przewodnik po wdrożeniu tworzenia wtyczki do Edytora Prezentacji Google, która tłumaczy wybrany tekst w prezentacji.
Cele
- Skonfiguruj skrypt.
- Uruchom skrypt.
Wymagania wstępne
Aby skorzystać z tego przykładu, musisz spełnić te wymagania wstępne:
- Konto Google (konta Google Workspace mogą wymagać zatwierdzenia przez administratora).
- przeglądarka internetowa z dostępem do internetu;
Konfigurowanie skryptu
- Utwórz prezentację w Prezentacjach pod adresem slides.new.
- Kliknij Rozszerzenia > Apps Script.
- Kliknij Projekt bez nazwy.
- Zmień nazwę projektu Apps Script na Translate Slides i kliknij Rename (Zmień nazwę).
- Obok pliku
Code.gs
kliknij Więcej more_vert
> Zmień nazwę. Nazwij plik translate
.
- Kliknij Dodaj plik add
> HTML. Nazwij plik
sidebar
.
Zastąp zawartość każdego pliku odpowiednim kodem, a potem kliknij Zapisz
.
Uruchamianie skryptu
- W prezentacji w Prezentacjach ponownie załaduj stronę.
- Kliknij Rozszerzenia >
Tłumacz slajdy
> Rozpocznij. Wyświetlenie elementu menu dodatku może zająć kilka sekund.
- Gdy pojawi się odpowiedni komunikat, autoryzuj dodatek.
- Ponownie kliknij Rozszerzenia >
Tłumacz slajdy
> Rozpocznij.
- Dodaj tekst do prezentacji i zaznacz go.
- Aby zastąpić zaznaczony tekst, w dodatku kliknij Tłumacz.
Dalsze kroki
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-02-14 UTC.
[null,null,["Ostatnia aktualizacja: 2025-02-14 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."]]],["This document outlines how to create a Google Slides add-on that translates selected text. Key steps include: creating a new Slides presentation and an Apps Script project named \"Translate Slides,\" renaming the default code file to \"translate\", adding a file named \"sidebar\" and replacing the content of these files with the specified code. The script creates a menu to \"Open Translate\", which shows a sidebar with language options, allowing users to select text in the presentation and click \"Translate\" to change it into the chosen language.\n"]]