Linux 软件免费装
Banner图

LangRouter for TranslatePress

开发者 WebAIPlanet
更新时间 2026年6月10日 09:45
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

translation multilingual translatepress deepl automatic translation

下载

1.1.3

详情介绍:

LangRouter for TranslatePress adds routing and fallback control to TranslatePress automatic translation. Instead of sending every request to a single provider, it lets you choose which translation engine should handle a request based on the current content type, target language, and fallback policy. This gives you more control over translation flow on multilingual WordPress sites. This plugin is an independent extension for TranslatePress. It is not affiliated with, endorsed by, or maintained by TranslatePress. It is intended for site owners, developers, agencies, and content teams that need more control than a single-engine setup can provide. Key features Supported translation engines LangRouter currently supports: How routing works LangRouter uses the following priority order:
  1. Post type route
  2. Language assignment
  3. Default engine
If a singular content request matches a post type rule, that engine becomes the primary route. If no post type rule matches, LangRouter checks the language assignment rules. If no language rule matches, the plugin uses the default engine. If the current engine cannot continue, LangRouter applies the configured fallback behavior. Depending on your settings, the request can stop immediately, jump directly to the default engine, or continue through the global fallback chain. Post type routing Post type routing is useful when different content types need different translation behavior. For example, you can: Post type routing applies only to singular content contexts, such as a single post, page, product, or custom post type entry. Archive pages, taxonomy pages, search results, and other non-singular views do not use post type routing. Language assignment and fallback rules Language assignment selects the primary engine for a target language. Fallback rules define what to try next only after the current primary engine cannot continue. This separation helps you build a clearer routing strategy: Dedicated engine settings Routing rules and engine credentials are managed separately. This makes the plugin easier to operate and maintain. In the engine settings area, you can configure items such as: Logging and troubleshooting LangRouter includes a built-in runtime log viewer. You can enable file logging, view recent log content inside the admin area, and download log files for debugging. This is useful when you want to confirm: Typical use cases

安装:

  1. Upload the plugin to the /wp-content/plugins/ directory, or install the ZIP through the WordPress admin.
  2. Install and activate TranslatePress Multilingual.
  3. Activate LangRouter for TranslatePress.
  4. Open TranslatePress automatic translation settings and select LangRouter Smart Translation as the engine.
  5. Set a default engine in the router settings.
  6. Add post type routes, language assignments, and fallback rules as needed.
  7. Open the engine settings page and configure the engines you want to use.
  8. Optionally enable file logging and test your routing behavior.

屏幕截图:

  • Post type routing with per-rule fallback behavior for posts, pages, products, and custom post types.
  • Language assignment, fallback rules, language support query, and TranslatePress test integration.
  • Logs page with the built-in runtime log viewer and log file management actions.
  • Volcengine Ark settings with account input, usage overview, and diagnostics.
  • Qwen settings with API key, model, region, custom API, timeout, and additional request JSON.
  • Hunyuan settings for Tencent Cloud endpoints and compatible third-party model endpoints.
  • OpenAI settings with model selection, custom model name, custom API, timeout, and request JSON.
  • DeepL settings with multi-key management, cooldown controls, and key status.
  • Compatible OpenAI API settings for third-party gateways and compatible providers, including headers and request JSON.

常见问题:

Does this plugin replace TranslatePress?

No. LangRouter for TranslatePress is an extension for TranslatePress automatic translation. It adds a routing layer and does not replace TranslatePress itself.

When does post type routing apply?

Post type routing applies only to singular content contexts, such as a single post, page, product, or custom post type entry. It does not apply to archive pages, taxonomy listings, search results, or other non-singular views.

What happens if a post type route fails?

That depends on the fallback mode configured for the matched rule. You can stop translation immediately, jump directly to the default engine, or continue through the global fallback chain.

Are language assignment and fallback rules the same thing?

No. Language assignment selects the primary engine for a target language. Fallback rules are used only after the current primary engine cannot continue.

Where do I configure API keys and models?

Use the dedicated engine settings page. Routing rules are configured separately from engine credentials and model parameters.

Can I use OpenAI-compatible services?

Yes. The plugin supports compatible OpenAI API endpoints, which is useful for third-party gateways, enterprise proxies, or self-hosted compatible services.

Can I inspect actual routing behavior?

Yes. LangRouter provides built-in runtime file logging so you can inspect selected engines, fallback decisions, and execution results.

更新日志:

1.1.3