翻译
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。

利用机器学习套件的设备端翻译 API,您可以在 50 多种语言之间动态翻译文本。
iOS
Android
主要功能
- 广泛的语言支持 在 50 多种不同的语言之间进行互译。请参阅完整列表。
- 久经考验的翻译模型 - 由 Google 翻译应用的离线模式使用的模型提供支持。
- 动态模型管理:通过动态下载和管理语言包,降低设备端存储空间需求。
- 在设备上运行:翻译会快速执行,不需要您将用户的文本发送到远程服务器。
限制
设备端翻译适用于随意且简单的翻译。翻译质量取决于源语言和目标语言。我们建议您针对特定使用场景评估翻译质量。如果您需要较高保真度,请尝试使用 Cloud Translation API。
此外,机器学习套件的翻译模型已经过训练,可从英语翻译成英语。当您在非英语语言之间进行互译时,英语会用作中间翻译,这可能会影响质量。
使用准则
如需了解有关使用此 API 的重要准则和限制,请参阅“准则”页面。本文档介绍了翻译文本时在应用中包含提供方说明的要求。
提供反馈
由于自然语言处理的复杂性,提供的翻译可能不适合某些上下文或受众群体。如果您遇到不当翻译,请与机器学习套件支持团队联系。您的反馈有助于我们继续改进模型,并允许我们停用不恰当的翻译。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eML Kit's on-device translation API enables dynamic translation between 50+ languages without needing an internet connection.\u003c/p\u003e\n"],["\u003cp\u003eIt leverages the same robust models as Google Translate's offline mode, ensuring high-quality translations.\u003c/p\u003e\n"],["\u003cp\u003eLanguage packs are dynamically managed, minimizing storage footprint on the user's device.\u003c/p\u003e\n"],["\u003cp\u003eWhile suitable for casual translations, it's recommended to evaluate the quality for specific use cases and consider Cloud Translation API for higher fidelity needs.\u003c/p\u003e\n"],["\u003cp\u003eTranslations involving non-English languages utilize English as an intermediary, potentially affecting the overall translation quality.\u003c/p\u003e\n"]]],["ML Kit's on-device translation API enables dynamic text translation between over 50 languages, utilizing the same models as Google Translate's offline mode. Language packs are dynamically managed to minimize storage. Translations occur directly on the device, ensuring speed and privacy. The API is designed for casual translations, with quality varying by language pair. For high fidelity, the Cloud Translation API is recommended. Usage requires adherence to specific guidelines, including attribution. Feedback is encouraged to improve the service.\n"],null,["With ML Kit's on-device translation API, you can dynamically translate text\nbetween more than 50 languages.\n\n[iOS](/ml-kit/language/translation/ios)\n[Android](/ml-kit/language/translation/android)\n\nKey capabilities\n\n- **Broad language support** Translate between more than 50 different languages. See the [complete list](/ml-kit/language/translation/translation-language-support).\n- **Proven translation models** Powered by the same models used by the Google Translate app's offline mode.\n- **Dynamic model management** Keep on-device storage requirements low by dynamically downloading and managing language packs.\n- **Runs on the device** Translations are performed quickly, and don't require you to send users' text to a remote server.\n\nLimitations\n\nOn-device translation is intended for casual and simple translations. The\ntranslation quality depends on the source and target languages. We recommend\nthat you evaluate the quality of the translations for your\nspecific use case. If you require higher fidelity, try the\n[Cloud Translation API](https://cloud.google.com/translate/).\n\nAlso, ML Kit's translation models are trained to translate to and from\nEnglish. When you translate between non-English languages, English is used as an\nintermediate translation, which can affect quality.\n\nUsage guidelines\n\nRefer to the [Guidelines page](/ml-kit/language/translation/translation-terms)\nfor important guidelines and restrictions on usage of this API. This document\nincludes requirements for including attribution in your app when translating\ntext.\n\nProvide feedback\n\nDue to the complexity of natural language processing, the translations provided\nmight not be appropriate for all contexts or audiences. If you encounter\ninappropriate translations, reach out to [ML Kit support](/ml-kit/community). Your\nfeedback helps to continue to improve the models, and also allows us to disable\ninappropriate translations."]]