Linux 软件免费装
Banner图

Deepglot

开发者 helpstring
更新时间 2026年9月24日 22:11
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

translation localization multilingual machine translation language switcher

下载

0.12.2 0.12.8 0.12.10

详情介绍:

Deepglot translates rendered WordPress pages through the Deepglot translation API and serves each visitor a localized site without duplicating posts. Development source and release build instructions are available at https://github.com/ostheimer/deepglot.

安装:

  1. Upload the release ZIP under Plugins -> Add New -> Upload Plugin.
  2. Activate Deepglot.
  3. Create the project and its source and target languages in the Deepglot dashboard.
  4. Open Settings -> Deepglot, enter the API base URL and API key, then configure WordPress-owned routing, switcher, and exclusion settings.

升级注意事项:

0.12.10 Adds localized document links and supported video file or embed URLs with safe fallback and cache purging. Publishing the package does not automatically update customer sites. 0.12.9 Adds locale-specific image replacements with safe responsive and lazy rewriting plus configured exclusions. 0.12.8 Keeps accessibility labels, image tooltips, and visible feed titles in the active language while ordinary link metadata stays excluded from translation requests, and prevents blank cache values from removing page metadata. 0.12.7 Moves project-wide language and automatic-translation ownership to the authenticated Deepglot project while preserving safe WordPress bootstrap, cached delivery, and background-queue reconciliation. 0.12.6 Keeps ordinary WordPress pages discoverable for multilingual synchronization while builder-only archives remain excluded. 0.12.5 Keeps early cookie-consent widgets and their legal links in the active language and removes non-queryable builder archives from multilingual discovery. 0.12.4 Prevents paid translations containing emoji from being dropped when WordPress transients use a legacy three-byte database table. 0.12.3 Prevents valid emoji and other four-byte Unicode from stalling background translation queues on sites with legacy WordPress database encodings. 0.12.2 Allows bounded URL synchronization to complete for safe canonical aliases while preserving strict origin, language, and no-follow validation. 0.12.1 Refreshes the dynamic translator asset for bounded Retry-After handling and corrects safe same-host HTTPS URL-sync previews. Preparing or publishing the package does not update customer sites automatically. 0.12.0 Moves fresh translations off the page render into a background job, so cold pages load fast instead of waiting for the translation API. Requires PHP 8.0 or newer. 0.11.7 Allows trusted site-specific callbacks to localize media embeds after the full translation pipeline. Requires PHP 8.0 or newer. 0.11.6 Prevents content-heavy cold pages from exceeding the translation window as one oversized provider request. Requires PHP 8.0 or newer. 0.11.5 Allows cold large-page translations up to 60 seconds to complete instead of returning partially untranslated pages. Requires PHP 8.0 or newer. 0.11.4 Preserves translated routes whose source slug consists only of digits. Requires PHP 8.0 or newer. 0.11.3 Hardens localized SEO metadata and slug canonicalization, preserves search routing, and allows longer translation batches. Requires PHP 8.0 or newer. 0.11.2 Reports an invalid or revoked API key in wp-admin and stops re-sending doomed translation requests on every page view. Requires PHP 8.0 or newer. 0.11.1 Preserves action links, restores descriptive ISO-code labels, and improves WordPress.org compatibility. Requires PHP 8.0 or newer.

常见问题:

Do I need a Deepglot account?

Yes. Use an account at https://deepglot.ai or configure a compatible self-hosted Deepglot service.

Where do I change the source language, target languages, and automatic redirect?

Change these project-wide values in the Deepglot dashboard. After the plugin receives an authenticated, versioned runtime snapshot, WordPress displays them as read-only mirrors. Entering a different API key or backend temporarily unlocks the mirror values for a valid bootstrap request; the new project's runtime snapshot then replaces them.

Does the plugin duplicate posts?

No. Translation happens on rendered output. Source content remains in the original WordPress posts and pages.

Can translated pages use different images?

Yes. A project manager can explicitly map an original same-site image to a localized same-site image for each active target language through the authenticated Deepglot project management API. The plugin updates src, srcset, data-src, and data-srcset on translated image elements, including responsive picture sources. Source-language pages and excluded content are unchanged. Each project supports at most 500 mappings in total. Same-site image formats are PNG, JPG, JPEG, WebP, AVIF, and GIF. Document links support PDF, DOCX, XLSX, and PPTX; self-hosted video supports MP4 and WebM. File URLs must be root-relative or HTTPS on the project host. Video embeds support only exact HTTPS www.youtube.com/embed/ID, www.youtube-nocookie.com/embed/ID, and player.vimeo.com/video/ID endpoints, with an unchanged provider host and no query or fragment. Documents and self-hosted videos must retain their file extension. External CDN images, SVG, other iframe providers, uploads, AI-generated assets, subtitles, and dynamically inserted AJAX media are unsupported. Project managers are responsible for all file and video usage, publication, and redistribution rights; Deepglot does not verify licenses, file existence, or content type. There is currently no dashboard editing interface. The plugin refreshes runtime mappings at most every 300 seconds when a request reaches WordPress and stores them in a dedicated non-autoloaded option. On a changed snapshot it purges known WP Rocket, W3 Total Cache, LiteSpeed Cache, and WP Super Cache page caches. An upstream CDN or page cache that prevents WordPress from receiving a refresh request needs an operator purge and public readback. Missing or deleted mappings leave the original URL in place.

What happens when the quota is exhausted?

Cached translations remain available. Uncached content falls back to the source language, and administrators see a quota notice.

What happens when Deepglot returns HTTP 429?

The plugin respects Retry-After as delta seconds or a strict RFC HTTP date, using a bounded delay of one second to one hour and a 60-second fallback for missing, relative, or invalid values. The first 429 stops the remaining sequential batches; parallel batches already in flight keep their own responses and the browser keeps the longest delay. An active 429 marker locally stops synchronous visual-editor and WooCommerce email calls and already-due warmer runs until retry_at. Only translation 429 responses set the active marker; configuration and synchronization 429 responses do not. The marker and warmer backoff are bound to the API key and backend. Configuration changes, late responses from the previous configuration, and legacy or unbound markers do not block new translations. Background warming waits for the bounded delay, and dynamic visitor requests are not immediately retried. Cached translations remain available while uncached content stays in the source language. A permanent 422 velocity_request_too_large means one request cannot fit the hourly policy even in an empty window. The WordPress warmer automatically splits a multi-text 422 batch under its existing six-batch run budget. Every 422 batch shape is tracked for up to one hour by a configuration-bound HMAC fingerprint to drive bounded splitting; only a text that still returns 422 alone is blocked from automatic resend. The marker stores no raw translation text, API key, or URL. Normal following batches continue, and an API key or backend change heals the marker immediately. The plugin keeps source language content available and does not schedule an automatic timer retry for that singleton response. API requests and PDFs must still be split into smaller inputs by clients.

Why can the first translated page view still show the source language?

Since version 0.12.0, ordinary page requests do not wait for a slow translation provider. The first view queues uncached text for an immediately due WP-Cron job and, once both are stored, makes one non-blocking WP-Cron nudge in the same request. The nudge is skipped for DISABLE_WP_CRON and while cron is already running. After the job succeeds, Deepglot stores the translations locally and purges completed URLs in WP Rocket, W3 Total Cache, and LiteSpeed Cache. Because WP Super Cache exposes only a global purge, Deepglot waits until the tracked queue is empty so pending pages stay cached. If later views remain in the source language, verify that WP-Cron or the host's system cron is running and purge any other page-cache plugin manually. Since version 0.12.3, the text and URL queues use a versioned, checksummed ASCII-safe storage envelope. This preserves valid Unicode, including emoji, even on legacy WordPress option tables that cannot store four-byte UTF-8 directly. Existing queue arrays migrate automatically; damaged queue data is rejected without being overwritten or deleted during disabled cleanup. A separate short atomic lock couples text and URL queue reconciliation with cache purging, and lease fencing stops stale owners from committing only one side. Translation-provider requests remain outside that lock. If a cold render cannot durably enqueue both sides, its source-language response is marked non-cacheable so a later request can retry. Since version 0.12.4, translated cache values also use a separate versioned, checksummed ASCII-safe key space. Existing non-empty plain-string cache entries remain readable. A cache write counts as complete only after an exact readback; failed writes stay queued, their page cache is not purged, and inline responses remain non-cacheable until the translation is durable. Version 0.12.8 rejects empty and whitespace-only translations on both cache writes and reads, including legacy cache values. Since version 0.12.5, configured cookie-consent widgets that already exist before the footer observer starts are translated through the same bounded dynamic endpoint without rescanning the server-rendered page. Their internal page links are localized with the server-side routing rules and are never sent to the translation provider. Version 0.12.6 follows WordPress core viewability for public post types, so built-in pages remain in the multilingual sitemap while non-viewable builder content types stay excluded. Public taxonomies must still be publicly queryable. Version 0.12.7 reads project-wide language, redirect, disclosure, and automatic-translation settings from one authenticated, versioned SaaS snapshot. WordPress keeps valid cached translations available when automatic generation is off, prunes obsolete warm-up work after a language change, and prevents source-language cache-only fallbacks from entering full-page caches under a target URL. Version 0.12.8 translates generic ARIA labels in the page body, image title tooltips, and human-readable RSS or Atom feed titles while excluding ordinary link metadata from provider requests, and rejects blank translation-cache values. Version 0.12.9 adds locale-specific, same-site image replacements for server-rendered responsive and lazy-loaded images while preserving excluded and unsafe content. Version 0.12.10 adds document links and supported video URLs and embeds. When every attempted SaaS provider returns only a count mismatch for the same multi-text root chunk, Deepglot starts direct singleton isolation. It skips redundant binary intermediate shapes and retries each original text through the configured provider chain in input order. The provider-call ceiling is chain length × (chunk size + 1) for a multi-text root, while an original singleton gets one chain; a default eight-text chunk with two providers therefore allows at most 18 provider calls. All root chunks and isolated singletons share the request-wide provider-call concurrency cap (default 12) and a 100-second provider-work deadline. A failing parallel chunk stops new sibling provider calls, while the WordPress warmer keeps any terminal remainder queued. Singleton, call-budget, and deadline mismatches remain terminal; timeouts, authentication failures, rate limits, U+0000 output, and other malformed responses never enter this extra isolation path. Deepglot finishes all bounded root-chunk attempts before starting singleton work. It collects only roots whose complete provider chains produced count mismatches; any other terminal error still aborts siblings immediately. Before calibration, Deepglot compares the remaining deadline with a conservative one-wave reserve: the fastest elapsed duration among the completed full count-mismatch root chains. If that reserve cannot fit, no singleton provider call starts. This root-derived reserve is used only for calibration admission and is never extrapolated across later work. It then runs one global calibration wave containing the first min(request-wide concurrency, total mismatched texts) real singletons through their full provider fallback chains and retains its results. If the shared deadline expires during any admitted singleton wave despite the admission checks, Deepglot returns the same typed deadline error instead of a generic timeout. The remaining work is split into request-wide bounded waves. Before each later wave, Deepglot compares waves still pending × duration of the immediately preceding observed singleton wave with the remaining shared deadline and remeasures after every completed wave. That deadline is the earlier of the local provider-work ceiling and the caller's monotonic absolute deadline; the PDF route passes its route-entry 40-second deadline so authentication, upload handling, and preparation consume the same budget. If the pending work cannot fit, Deepglot stops after the last retained wave and before any further singleton call. /api/translate and PDF return the stable 503 code translation_count_mismatch_deadline; once provider work has started, the API conservatively keeps the velocity reservation and retains an idempotent same-key 503 for at most 60 seconds. Otherwise, the remaining affected texts continue through the same globally bounded singleton queue, preserving result order and each text's full provider fallback chain.

How do I translate existing pages without opening every URL?

Under Settings -> Deepglot, create a URL preview with a small limit and the required target languages, review the sample URLs, and explicitly confirm the immutable snapshot. When WordPress recognizes a safe HTTPS request on the same host as an internal target still stored with HTTP, the preview changes only that target's scheme to HTTPS; semantic query parameters and fragments are preserved. It never copies a foreign request host. One absolute, query-free redirect on the exact same origin and in the requested target language is verified through separate public and origin probes while automatic redirect following stays disabled. Other redirects remain bounded failures; unsafe targets do too. One batch contains at most 250 safe internal entries from the multilingual sitemap and opens at most two target pages per cron run. The job reports aggregate progress and can be paused, resumed, cancelled, or retried for failed URLs. It pauses when the quota is exhausted or the API key is invalid and automatically backs off on API rate limits. Continue large sites with the next bounded batch. This is an explicit administrator action, not a permanent crawler.

更新日志:

0.12.10 0.12.9 0.12.8 0.12.7 0.12.6 0.12.5 0.12.4 0.12.3 0.12.2 0.12.1 0.12.0 0.11.7 0.11.6 0.11.5 0.11.4 0.11.3 0.11.2 0.11.1 0.11.0 0.10.4 0.10.3 0.10.2 0.10.1 0.10.0