
內容簡介
SaintLang 是一款專為 WordPress 設計的多語言翻譯外掛,旨在提供快速的編輯工作流程。它將每種語言與相同的 WordPress 文章、頁面或自訂文章 ID 綁定,並以語言為單位儲存翻譯字段,避免為每個翻譯創建第二個 WordPress 文章。
【主要功能】
• Gutenberg 和經典編輯器中的語言選擇條
• 支援標題、內容、摘要及進階自訂欄位翻譯
• 文章和頁面列表中的語言標籤無需全頁重新載入
• 所有配置語言共用相同的 WordPress 內容 ID
• 缺少翻譯時提供原始內容回退
• 支援 WooCommerce、ACF、Yoast SEO 等外掛
外掛標籤
開發者團隊
原文外掛簡介
SaintLang is a multilingual translation plugin for WordPress focused on a fast editor workflow.
Each language stays attached to the same native WordPress post, page, product, or custom post ID. SaintLang stores translated fields by language instead of creating a second WordPress post for every translation.
Key features:
One language bar in Gutenberg and the Classic Editor: pick a language and the native editor opens in it, with WordPress’ own Update button saving that language.
Translates titles, content, excerpts and Advanced Custom Fields (all field types, including repeaters and flexible content).
Posts and Pages list language tabs without full-page reloads.
Same WordPress content ID across all configured languages.
Original-content fallback until a missing translation is saved.
Explicit language catalog: only languages selected by an administrator are configured.
Language URL modes: language directories such as /en/ (recommended), subdomains such as en.example.com, or a ?lang= parameter.
hreflang and x-default output.
String Translation for WordPress Gettext strings on the public site.
Translation Memory and terminology glossary.
Optional AI translation through the WordPress AI Client (WordPress 7.0+), DeepL or Google Cloud Translation.
WooCommerce, ACF, Yoast SEO, Rank Math, Elementor and Bricks compatibility helpers.
Header language switcher and [saintlang_switcher] shortcode.
English and Arabic SaintLang dashboard UI with RTL support.
REST API and WP-CLI commands.
Shortcode
Use:
[saintlang_switcher]
Optional attributes:
[saintlang_switcher flags="1" names="1" hide_current="0" style="dropdown"]
style accepts `dropdown`, `pills` or `minimal`.
External Services
SaintLang connects to third-party services only for the optional AI translation features described below. No request is sent unless the provider has been configured and an authorized user explicitly runs an AI translation action or job.
WordPress AI Client (WordPress 7.0+)
When the “WordPress AI” provider is selected and an authorized user runs an AI translation, SaintLang sends the text to translate and translation instructions to the WordPress AI Client. WordPress then sends it to the AI provider the site owner connected in Settings → Connectors. SaintLang does not store AI provider credentials or contact AI providers directly; the connected provider’s own terms and privacy policy apply.
DeepL
Used to translate text with DeepL. When requested, SaintLang sends the text to translate and the source/target language codes to api.deepl.com or api-free.deepl.com.
DeepL Terms: https://www.deepl.com/pro-license
DeepL Privacy Policy: https://www.deepl.com/privacy
Google Cloud Translation
Used to translate text with Google Cloud Translation. When requested, SaintLang sends the text to translate and the source/target language codes to translation.googleapis.com.
Google Cloud Terms: https://cloud.google.com/terms/
Google Privacy Policy: https://policies.google.com/privacy
Privacy
SaintLang does not include telemetry, advertising, or hidden tracking.
When a visitor chooses a language, SaintLang stores a saintlang_lang cookie so background requests (for example AJAX cart updates) use the same language. Page URLs always decide which language a page is shown in. SaintLang stores the SaintLang dashboard-language preference in WordPress user meta for logged-in users.
Content is sent to an external AI/translation provider only when an authorized user has configured that provider and explicitly runs an AI translation action or job.
WP-CLI
wp saintlang languages
wp saintlang scan-strings
wp saintlang translate 123 --to=ar
wp saintlang seo-audit
Developer Notes
Post types can be excluded from translation (no language bar, no translation storage) with the saintlang_translatable_post_type filter: add_filter( 'saintlang_translatable_post_type', fn( $on, $type ) => 'my_form_entry' === $type ? false : $on, 10, 2 );
SaintLang uses WordPress capabilities, permission callbacks on REST routes, native enqueue functions, the Options API, user meta, WP-Cron / Action Scheduler integration when available, and WordPress database APIs.
No third-party JavaScript UI framework or CDN asset is used. The admin interface font (Cairo), icons and country flags are bundled with the plugin, so SaintLang never loads images or fonts from external servers.
Source Code
SaintLang has no build step. The JavaScript files in assets/js/ (admin.js, editor.js, classic-editor.js, content-list.js, language-switch.js, frontend.js) and the stylesheets in assets/css/ are the original, human-readable source files. They are written by hand in plain JavaScript and CSS, with no bundler, transpiler or minifier, and are shipped exactly as written. No npm, webpack or other build tooling is needed to read, modify or rebuild them.
The inline SVG icons in the JavaScript files are copied unchanged from Lucide (https://github.com/lucide-icons/lucide, ISC License).
WordPress Admin Isolation
SaintLang does not reposition, restyle, translate, or change the direction of the native WordPress admin menu or toolbar.
Dashboard Arabic/English direction changes are scoped only to the SaintLang application area.
Credits
Cairo font by The Cairo Project Authors, licensed under the SIL Open Font License 1.1 (assets/fonts/OFL.txt).
Interface icons from Lucide (https://lucide.dev), licensed under the ISC License.
Country flags from flag-icons by Panayiotis Lipiridis (https://github.com/lipis/flag-icons), licensed under the MIT License (assets/flags/LICENSE.txt).
