
內容簡介
段落總結:TranslateML 是一個強大又輕巧的 WordPress 外掛,旨在提供無縫的前端內容翻譯。該外掛使用 TranslateML API 來進行翻譯,並利用快取技術提供高性能。
問題與答案:
問題:TranslateML 的主要功能有哪些?
答案:TranslateML 的主要功能包括:
- 自動翻譯:使用 TranslateML API 動態翻譯前端內容。
- 快取:優化快取,提供更快的翻譯交付。
- 語言切換器:在網站上輕鬆切換多種語言。
- 可自訂URL:將兩位數語言代碼添加到URL中,以便製作有利於 SEO 的語言版本。
- 預設語言:如果無法翻譯,將回退到預設語言(英語)。
問題:TranslateML 如何運作?
答案:TranslateML 的運作方式包括以下步驟:
- 捕捉頁面的輸出緩衝區。
- 將內容發送到 TranslateML API 進行翻譯。
- 用翻譯版本替換內容,或者如果無法翻譯則使用預設語言。
- 為提高性能,將翻譯內容進行快取。
問題:TranslateML 的性能注意事項是什麼?
答案:TranslateML 在請求非預設語言且設置了有效的 API 金鑰時才會激活其翻譯緩衝區。然而,在某些環境中,特別是高流量網站或具有大量內容的頁面上,這可能帶來性能開銷。
外掛標籤
開發者團隊
原文外掛簡介
TranslateML is a powerful yet lightweight WordPress plugin designed to provide seamless frontend content translation. The plugin uses the TranslateML API to translate text and leverages caching to deliver high performance.
Key Features:
Automatic Translation: Translates frontend content dynamically using TranslateML API.
Caching: Optimized caching for faster translation delivery.
Language Switcher: Easily switch between multiple languages on your site.
Customizable URLs: Adds a two-digit language code to URLs for SEO-friendly language versions.
Default Language: Falls back to the default language (English) if a translation is unavailable.
How It Works:
Captures the output buffer of the page.
Sends the content to TranslateML API for translation.
Replaces the content with the translated version or uses the default language if no translation exists.
Translations are cached for enhanced performance.
Performance Note:
TranslateML activates its translation buffer only when a non-default language is requested and a valid API key is configured. However, this may introduce performance overhead in certain environments — especially on high-traffic sites or pages with large content.
Scenarios to watch:
Remote API calls on every translated page request (if not cached)
Incompatibility with server-side full-page caching (e.g., Varnish, NGINX)
Large dynamic pages without caching may slow down noticeably
Bug Reports
Bug reports for TranslateML are welcomed on GitHub. Please note GitHub is not a support forum, and issues that aren’t properly qualified as bugs will be closed.
External Services
This plugin relies on the following third-party service:
TranslateML.com API
TranslateML plugin connects to TranslateML.com API to translate the contents. It sends the user’s site url , language source and language target to perform translation. No personally identifiable information (PII) is collected or transmitted.
This API service is provided by the developer of the plugin : Terms of Service , Privacy Policy
