翻譯 Google 簡報中的文字
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本快速入門會建立 Google 簡報編輯器外掛程式,翻譯簡報中選取的文字。
目標
必要條件
如要使用這個範例,您必須符合下列先決條件:
- Google 帳戶 (Google Workspace 帳戶可能需要管理員核准)。
- 可連上網際網路的網路瀏覽器。
設定指令碼
- 前往 slides.new 建立 Google 簡報。
- 依序點選「擴充功能」>「Apps Script」。
- 按一下「未命名專案」。
- 將 Apps Script 專案重新命名為「Translate Slides」,然後按一下「重新命名」。
- 找出
Code.gs
檔案,然後依序點選「更多」圖示 more_vert
>「重新命名」。將檔案命名為 translate
。
- 依序點選「新增檔案」圖示 add
>「HTML」。將檔案命名為
sidebar
。
將每個檔案的內容替換成下列對應的程式碼,然後按一下「儲存」圖示
。
執行指令碼
- 在 Google 簡報中重新載入頁面。
- 依序點選「擴充功能」>「翻譯投影片」>「開始」。外掛程式選單項目可能需要幾秒鐘才會顯示。
- 出現提示訊息時,請授權使用外掛程式。
- 再次依序點選「擴充功能」>「翻譯投影片」>「開始」。
- 在簡報中新增文字並選取。
- 在外掛程式中,按一下「翻譯」即可取代所選文字。
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-09-12 (世界標準時間)。
[null,null,["上次更新時間:2025-09-12 (世界標準時間)。"],[],["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"],null,[]]