{"id":347117,"date":"2026-07-31T09:24:48","date_gmt":"2026-07-31T09:24:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/btranslate\/"},"modified":"2026-07-31T11:58:16","modified_gmt":"2026-07-31T11:58:16","slug":"hyx-translator-for-baidu-translate","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/hyx-translator-for-baidu-translate\/","author":23539883,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.3.0","stable_tag":"0.3.0","tested":"7.0.2","requires":"6.4","requires_php":"8.1","requires_plugins":null,"header_name":"HTBD - hyx Translator powered by Baidu Translate","header_author":"hanyixuanten","header_description":"Persistent multilingual WordPress translations powered by Baidu Translate.","assets_banners_color":"","last_updated":"2026-07-31 11:58:16","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/www.vblg.top\/index.php\/archives\/147","header_author_uri":"https:\/\/www.vblg.top","rating":0,"author_block_rating":0,"active_installs":0,"downloads":31,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.2.4":{"tag":"0.2.4","author":"hanyixuanten","date":"2026-07-31 09:24:30"},"0.3.0":{"tag":"0.3.0","author":"hanyixuanten","date":"2026-07-31 11:58:16"}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.2.4","0.3.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[],"plugin_category":[],"plugin_contributors":[274014],"plugin_business_model":[],"class_list":["post-347117","plugin","type-plugin","status-publish","hentry","plugin_contributors-hanyixuanten","plugin_committers-hanyixuanten"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/hyx-translator-for-baidu-translate.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>HTBD translates supported WordPress content with the Baidu Translate API and persists each translation for reuse. It supports language-specific subdirectory URLs and domain bindings.<\/p>\n\n<p>The WordPress admin interface follows the current WordPress locale. English is the default, and a bundled Simplified Chinese translation is used when WordPress is set to <code>zh_CN<\/code>.<\/p>\n\n<p>Supported values include published post and page titles, content, excerpts, image alternative text, categories, tags, and selected SEO fields. Automatic translation is only scheduled for posts and pages with the <code>publish<\/code> status. Completed translations are stored in the <code>{$wpdb-&gt;prefix}hyx_bd_translations<\/code> custom database table. Existing <code>{$wpdb-&gt;prefix}btranslate_translations<\/code> data is migrated when the renamed plugin is activated. Front-end rendering reuses stored values and never calls the translation provider dynamically.<\/p>\n\n<p>Subdirectory routing supports paths such as <code>\/en\/example-post\/<\/code>. Domain routing maps configured hostnames to target languages. Requests for <code>wp-login.php<\/code> or <code>wp-admin<\/code> through a target-language route are redirected to the corresponding source-site URL while preserving query parameters. Translation failures are non-fatal and fall back to source-language content.<\/p>\n\n<h3>External Services<\/h3>\n\n<p>HTBD connects to the Baidu Translate Open Platform API, a service provided by Baidu, to translate WordPress content. The plugin cannot generate new translations without this service. A Baidu Translate account, application ID, and secret key are required. Baidu may apply request quotas or usage charges according to the service plan selected by the site administrator.<\/p>\n\n<p>The API is contacted by scheduled tasks after a published post or page is saved, after a supported category or tag is created or edited, or after an administrator explicitly queues or refreshes translations. Front-end page views reuse stored translations and do not contact Baidu. The plugin also makes no Baidu request when valid persisted translations are already available, unless an administrator explicitly requests a refresh.<\/p>\n\n<p>For each translation request, the plugin sends the text being translated, the configured source and target language codes, the Baidu application ID, a random salt, and a request signature. Depending on the content being translated, the text may contain published post or page titles, body text, excerpts, selected SEO title and description values, attached image alternative text, and category or tag names and descriptions. Standard network information, including the originating server IP address, is also visible to Baidu as part of the HTTPS request. The secret key is used locally to create the signature and is not sent as a separate request field.<\/p>\n\n<p>HTBD stores the returned translated text in the WordPress database but does not store complete Baidu response payloads. Data sent to Baidu is subject to Baidu's own terms and privacy practices:<\/p>\n\n<ul>\n<li>Baidu Translate API documentation: https:\/\/fanyi-api.baidu.com\/doc\/23<\/li>\n<li>Baidu Translate Open Platform service agreement: https:\/\/fanyi-api.baidu.com\/doc\/6<\/li>\n<li>Baidu privacy policy: https:\/\/privacy.baidu.com\/policy<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>hyx-translator-for-baidu-translate<\/code> directory to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate HTBD through the Plugins screen in WordPress.<\/li>\n<li>Open Settings &gt; HTBD and configure the Baidu credentials, languages, and routing mode. Enable automatic source-language detection to use Baidu's <code>auto<\/code> source language mode.<\/li>\n<li>After saving settings for the first time, manually run Retranslate all content to queue existing content.<\/li>\n<\/ol>\n\n<p>Automatic detection is stored independently from the source language value. Manually entering <code>auto<\/code> without enabling automatic detection remains a distinct configuration state.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20the%20plugin%20translate%20content%20on%20every%20page%20request%3F\"><h3>Does the plugin translate content on every page request?<\/h3><\/dt>\n<dd><p>No. Each value is translated by a scheduled task and persisted for reuse. Front-end requests read stored translations only.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20translate%20code%20in%20posts%20or%20pages%3F\"><h3>Does the plugin translate code in posts or pages?<\/h3><\/dt>\n<dd><p>No. Content inside HTML <code>&lt;pre&gt;<\/code> and <code>&lt;code&gt;<\/code> elements is preserved in the source language and is not sent for translation.<\/p><\/dd>\n<dt id=\"how%20do%20i%20retry%20a%20failed%20translation%3F\"><h3>How do I retry a failed translation?<\/h3><\/dt>\n<dd><p>Failed posts, pages, categories, or tags appear below the progress bar on the Settings page. Use the Retranslate button beside an item to retry it.<\/p><\/dd>\n<dt id=\"what%20data%20is%20removed%20during%20uninstall%3F\"><h3>What data is removed during uninstall?<\/h3><\/dt>\n<dd><p>Uninstalling removes plugin settings, scheduled tasks, and the custom translation table, including all persisted translations.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.3.0<\/h4>\n\n<ul>\n<li>Add automatic source-language detection using Baidu's <code>auto<\/code> mode.<\/li>\n<li>Redirect target-language <code>wp-admin<\/code> and <code>wp-login.php<\/code> requests to the source site while preserving query parameters.<\/li>\n<li>Add automated GitHub Release packaging and WordPress.org SVN deployment workflows.<\/li>\n<\/ul>\n\n<h4>0.2.4<\/h4>\n\n<ul>\n<li>Fix translated titles so singular views use the current post context.<\/li>\n<li>Preserve content inside HTML <code>&lt;pre&gt;<\/code> and <code>&lt;code&gt;<\/code> elements instead of sending it for translation.<\/li>\n<li>Improve plugin security metadata and translator attribution.<\/li>\n<li>Update the plugin homepage URL.<\/li>\n<\/ul>\n\n<h4>0.2.3<\/h4>\n\n<ul>\n<li>Rename the plugin and codebase to HTBD \/ hyx-translator-for-baidu-translate.<\/li>\n<li>Migrate existing translation data from the previous custom database table.<\/li>\n<li>Update packaging, localization, documentation, and issue templates for the new plugin identity.<\/li>\n<li>Fix the release archive build workflow.<\/li>\n<\/ul>","raw_excerpt":"Persistent multilingual WordPress translations powered by the Baidu Translate API.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/347117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=347117"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/hanyixuanten"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=347117"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=347117"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=347117"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=347117"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=347117"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=347117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}