Google Transl 迭代 API 开发者指南
保留所有权利。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-03-30。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2023-03-30。"],[[["The Google Transliterate API allows you to detect languages and transliterate text blocks into various scripts within your web applications."],["It offers a `TransliterationControl` for managing transliteration settings and applying it to HTML elements, along with methods for controlling and customizing the process."],["To use the API, include the necessary JavaScript file, load the 'transliteration' package, and ensure your HTML uses UTF-8 encoding."],["You can use methods like `makeTransliteratable` to enable transliteration on specific elements and `google.language.transliterate` to transliterate text asynchronously."],["The API supports a range of languages, provides browser compatibility checks, and offers options for styling and customization to seamlessly integrate into your web application."]]],["The Google Transliterate API facilitates text conversion between scripts using JavaScript. Key actions include loading the API via `google.load`, enabling transliteration on HTML elements with `.makeTransliteratable`, and displaying a control using `.showControl`. Transliteration is managed with methods like `.enableTransliteration`, `.disableTransliteration`, `.toggleTransliteration`. Language pairs are set and retrieved with `.setLanguagePair` and `.getLanguagePair`, while current status is shown by `isTransliterationEnabled`. Asynchronous calls require callback functions. Event listeners are registered via `.addEventListener` to control different events.\n"]]