外掛說明
Simple Slug Translate 能將文章、頁面、分類及分類法代稱自動翻譯為英文。
這個外掛能讓永久連結更易於辨讀,這樣也能對 SEO 有較為正面的成效。
外掛使用的翻譯引擎由 Watson Language Translator,並支援以下語言:
- 阿拉伯文
- 保加利亞文
- 孟加拉文
- 捷克文
- 丹麥文
- 德文
- 希臘文
- 英文
- 西班牙文
- 芬蘭文
- 法文
- 古吉拉特文
- 希伯來文
- 印度文
- 匈牙利文
- 義大利文
- 日文
- 韓文
- 拉脫維亞文
- 馬來亞拉姆文
- 挪威文 (巴克摩)
- 尼泊爾文
- 荷蘭文
- 波蘭文
- 葡萄牙文
- 羅馬尼亞文
- 俄文
- 僧伽羅文
- 斯洛伐克文
- 斯洛維尼亞文
- 塞爾維亞文
- 瑞典文
- 泰文
- 土耳其文
- 烏克蘭文
- 烏都文
- 越南文
- 簡體中文
- 繁體中文
要使用這項服務,必須先註冊 IBM Cloud Lite 帳號,並取得專屬的 Watson Language Translator 服務 API 金鑰。使用免費方案的話,每個月不限網站數量可翻譯 1,000,000 個字元。
相關連結
安裝方式
- 將
simple-slug-translate
目錄上傳至外掛安裝目錄。 - 在 WordPress 管理後台的 [外掛] 選單中啟用外掛。
- 前往 [控制台]→[設定]→[Simple Slug Translate]。
- 在 [API 設定] 中輸入專屬的 API 金鑰。
- 在 [翻譯設定] 中選取要進行翻譯的來源語言。以台灣繁體中文為例,請選取 [zh-TW – Traditional Chinese]。
- 在 [權限設定] 中選取要自動翻譯代稱的內容類型。
- 當作者更新文章時,這個外掛會自動將文章代稱從指定的來源語言翻譯為英文。這個功能也可以用於頁面、分類其其他分類法。
進一步了解:
常見問題集
-
使用這個外掛需要哪些準備?
-
必須先註冊 IBM Cloud Lite 帳號,並取得專屬的 Watson Language Translator 服務 API 金鑰。
這個外掛只有向翻譯引擎進行查詢時才會使用 API 金鑰,與查詢無關的運作均不會使用 API 金鑰。
-
已存在但未翻譯的代稱,是否可由翻譯的代稱進行覆寫?
-
請使用以下設定切換代稱是否可進行覆寫。
- [控制台]→[設定]→[Simple Slug Translate]→[覆寫現有代稱]
-
是否能自訂翻譯的代稱?
-
網站管理員能透過呼叫
simple_slug_translate_results
篩選器自訂代稱。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** * Customize the translated slug. */ add_filter( 'simple_slug_translate_results', function( $results ) { // 200 – OK if ( 200 === $results['code'] ) { // Customize slug $results['text'] = sprintf( 'translated-%s', $results['text'] ); } return $results; } ); -
能否僅翻譯特定發佈狀態的文章的代稱?
-
網站管理員能透過呼叫
simple_slug_translate_post_status
篩選器自訂代稱。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** * Customize translated post statuses. */ add_filter( 'simple_slug_translate_post_status', function( $statuses ) { // Specify post statuses $statuses = [ 'draft', 'publish', ]; return $statuses; } );
使用者評論
參與者及開發者
變更記錄
2.7.3
- Fixed bug
2.7.2
- Add taxonomy settings
2.7.1
- Fixed bug
2.7.0
- Add supported languages
- Add uninstalling process
- Removed endpoint default value
2.6.2
- Fixed bug
2.6.1
- Fixed bug
2.6.0
- Fixed bug
- Add overwrite settings
2.5.0
- Add supported languages
2.4.0
- Add supported languages
2.3.1
- Fixed bug
2.3.0
- Support service endpoints by location
2.2.0
- Add filter hook
2.1.0
- Support Gutenberg
- Add post type settings
- Fixed some bugs
2.0.0
- Migrate to Language Translator API v3
1.2.2
- Fixed bug
1.2.1
- Update text
1.2.0
- Fixed bugs
- Add filter hook
1.1.0
- Add API settings check
1.0.1
- Add scheduled event
1.0.0
- Initial Release