Translation Tools

外掛說明

無論有沒有語言套件,都能使用任何地區語言

使用核心程式語言套件,便能輕鬆變更 WordPress 網站的介面語言。

僅有本地化完成度達 100% 的地區語言才會提供語言套件。

為了讓參與人員較少的地區語言團隊更有機會以他們的地區語言發佈 WordPress 核心程式,從 2021 年 2 月 22 日開始,建置 WordPress 核心程式的語言套件完成進度變更如下:

如果網站需要尚未提供語言套件的地區語言介面,這個工具能協助網站管理員啟用可用語言清單中的全部地區語言。

Preferred Languages 外掛相容

Preferred Languages 外掛會覆寫網站及使用者語言的標準語言欄位設定。

Translation Tools 所提供的全部功能均可供 Preferred Languages 外掛使用者使用。

依需求更新 WordPress、外掛或佈景主題的語言套件

如果網站管理員需要依需求更新 WordPress 核心程式、外掛或佈景主題的語言套件,而不想等待官方系統產生語言套件時,這個工具能讓網站管理員一鍵手動更新已安裝版本的全部必要檔案。

前往 [WordPress 更新] 畫面的 [語言套件] 區段,並選取想要更新的項目。

WordPress 核心程式全部子專案

  • Development
  • Continents & Cities
  • Administration
  • Network Admin

全部語言套件譯文檔案

  • .po (可編輯的譯文檔案)
  • .mo (二進位譯文檔案)
  • .l10n.php (PHP performant translation files)
  • .json (JavaScript 譯文檔案)

在 [網站資訊] 中顯示 WordPress 語言套件測試及資訊

這個外掛會在 [網站狀態] 測試項目頁面檢查網站的核心程式語言套件狀態。

在 [網站資訊] 偵錯資訊中會顯示網站介面語言及目前使用者的偏好語言;如果網站安裝了 Preferred Languages 外掛,也會顯示對應的多語系資訊。

螢幕擷圖

  • 語言相關設定會包含沒有語言套件的地區語言
  • 可依需求進行更新的 [更新 WordPress 語言套件] 按鈕
  • 核心程式全部子專案的語言套件
  • 子專案詳細資料及檔案
  • 為沒有語言套件的地區語言的佈景主題及外掛顯示語言套件更新通知
  • 為沒有語言套件的地區語言自動更新佈景主題語言套件
  • WordPress 的不完整語言套件的 [網站狀況] 測試結果建議
  • WordPress 的完整語言套件通過 [網站狀況] 測試項目
  • 網站介面語言及使用者偏好語言的 [網站狀態] 偵錯資訊,相容於 Preferred Languages 外掛

常見問題集

何處有 WordPress 地區語言完整清單?

這個官方頁面列出完整的 WordPress 地區語言清單。

如何知道地區語言是否已有語言套件?

已有語言套件的地區語言:清單
尚無語言套件的地區語言:清單

母語地區語言有語言套件但譯文並不完整

遇到這種狀況時,可以在 WordPress 控制台的 [WordPress 更新] 畫面,透過這個外掛進行語言套件強制更新。
點擊 [更新 WordPress 語言套件] 便可強制更新。
之後便會在極短時間內產生必要的語言套件檔案 (PO、MO 及 JSON)。

由於母語在 WordPress 的地區語言中沒有語言套件,因此無法使用母語介面的核心程式、佈景主題及外掛

僅需安裝並啟用這個外掛,便可啟用系統中全部地區語言及其語言套件。

想使用的地區語言不在地區語言清單中

如果想要使用的地區語言不存在 WordPress 系統中,請前往 WordPress 官方的〈要求新地區語言〉提出要求。

是否也能更新外掛及佈景主題的語言套件?

可以。從 1.5.0 版之後就具備這項功能。在 [WordPress 更新] 頁面,網站管理員可以選取要個別更新 WordPress、外掛、佈景主題或一次全部更新。這個外掛會更新 PO 及 MO 檔案,並同時產生 JavaScript 本地化所需的 JSON 檔案。

This plugin generates the new .l10n.php file format of performant translations for WordPress 6.5?

Yes, since version 1.7.0.
If you’re on WordPress 6.5, this plugin will also generate the .l10n.php language files for you.

這個外掛是否與 Preferred Languages 外掛相容?

是的。

Preferred Languages 外掛會覆寫網站及使用者語言的標準語言欄位設定。

這個外掛從 1.6.0 開始,便與 Preferred Languages 2.0.0 (或更新版本) 相容。

Translation Tools 所提供的全部功能均可供 Preferred Languages 外掛使用者使用。

如何將這個外掛本地化為使用者的母語?

如果有使用者要將這個外掛本地化為母語介面,請前往這個外掛的本地化專案頁面

如何參與這個外掛開發專案?

非常歡迎各位前往外掛的 GitHub 存放庫回報問題或提出功能建議。

使用者評論

2023 年 4 月 5 日 1 則留言
This is a function that Wordpress should bring natively!
2022 年 11 月 28 日 1 則留言
The big difficulty when a plugin uses mostly JS is that the source files are minified. It is therefore very difficult to understand exactly where the string to be translated is. This plugin allows to start the translation by validating and testing the strings locally little by little. Without waiting for 90%.
2020 年 8 月 10 日 1 則留言
A fundamental tool for translators (and not only), works flawlessly.
閱讀全部 3 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Translation Tools〉的開發相關工作。

參與者

〈Translation Tools〉外掛目前已有 17 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Translation Tools〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.7.0

  • Tested up to WP 6.5
  • Generate .l10n.php performant translation files for WordPress 6.5

1.6.0

  • Tested up to WP 6.2
  • Tested up to Preferred Languages 2.0
  • Minimum PHP bumped to 7.4
  • Fixed incorrect list of User Languages on WP < 6.1
  • Updated admin notices, dashicons and CSS
  • Fixed basic compatibility with the plugin Preferred Languages 2.0.0, still some work to do to make the UI seamless
  • Use Composer autoload
  • Rename coding standard rulesets
  • Update dependencies

1.5.3

  • Better report messages about translation project updates
  • Increase download timeout for slow speed connections
  • New filter to customize download timeout for big translation projects on slow speed connections
  • GitHub release process optimization

1.5.2

  • Fix i18n issue
  • Increase download timeout for slow speed connections
  • GitHub release process optimization

1.5.1

  • Add missing vendor files

1.5.0

  • Update your Plugins and Themes translations! (.po, .mo and .json)
  • Update action now loads on custom update-core dedicated page
  • Code refactoring to extend the update of .po/.mo/.json files to Plugins and Themes
  • Detailed report about translation project updates
  • New filter to customize/reverse the priority of the WP.org Plugins translation projects (defaults to ‘Stable’ > ‘Development’)
  • New filter to customize the Plugins and Themes translations to update
  • New filter to disable translations download and generate .json files from your current .po files
  • New filter do disable the update of the .json files from the JavaScript translations
  • GitHub release process optimization
  • Assets folders optimization
  • Debug mode improvements

1.4.1

  • Improve notices wording about Language Packs availability
  • Fix notice links accessibility

1.4.0

  • Tested up to WP 5.8
  • More Site Health WordPress translations tests!
  • Site Health test to check if the WordPress Translation API is available from your site
  • Site Health test to report if your WordPress version is already available for translation, useful for beta testing
  • Refactor Site Health tests to allow dependency between tests. ( e.g. Only run a test if another test has the status ‘good’ )
  • The Site Health Translations tests now have the #WPPolyglots Pink Color for usability
  • New warning notice in the updates screen when your WordPress version is not available for translation yet, useful for beta testing
  • Force checking the updates screen (‘force-check’) now force updates the WordPress core translation data
  • The WordPress core translation transient data now expire in 1 hour
  • Fix issue with the ‘More details’ report ID on downloading the Locales translation projects

1.3.3

  • Tested up to WP 5.7
  • Fix Health Check message i18n

1.3.2

  • Tested up to WP 5.6
  • Minor code improvements

1.3.1

  • Fix issue with Locale ‘en_US’ on user languages in Preferred Languages settings

1.3.0

  • New Site Health WordPress translations tests and debug info!
  • Site Health tests to show the current Language Packs status for your site and user languages, for your WordPress installed version
  • Site Health debug info includes details about your site and user language
  • Site Health tests and debug info are compatible with multiple languages configured in plugin Preferred Languages
  • Inspired by ticket #51039 (WIP)

1.2.4

  • Fix issue with missing strings from .json files, caused by overriding .json files from Development and Administration core sub-projects, instead of merging both.
  • Based on meta changeset #10064

1.2.3

  • New filter translation_tools_get_wp_translations_status to customize the status of the strings to download
  • New filter translation_tools_show_locale_codes to append Locale codes to each language
  • New filter translation_tools_show_locale_colors to highlight Locales without language packs
  • New filter translation_tools_translate_url to override the translate.w.org/projects/wp/ with a private GlotPress install with the same exact WP core structure
  • Filter ttools_get_wp_translations_status renamed to translation_tools_get_wp_translations_status
  • Compatible with plugin Translation Stats language select field
  • Code optimization

1.2.2

  • New filter ttools_get_wp_translations_status to customize the filtered strings to download, default is ‘current’
  • Fix support for core beta versions
  • Improve core translation sub-projects data through translate.wp.org API
  • Tested up to WP 5.5
  • Minor code improvements

1.2.1

  • Fix invalid plugin header on activate

1.2.0

1.1.0

  • Improve usability, remove extra steps to add Locales with no Language Packs
  • Remove plugin setting to pre-add a Locale to the main list, all existent languages are now available immediately
  • Language settings now include all Locales, grouped by Language Packs status
  • Language settings are now available for site (General Settings screen) and for users (Profile and User Edit screens)
  • Rename additional available languages to “Native name [wp_locale]” format, instead of just the “wp_locale”
  • Link to update WordPress translation on the Site, Profile and User language setting description
  • Localized core update fallback to en_US for Locales with no Language Packs
  • Minor code improvements

1.0.1

  • Improve shown info when there are no settings yet
  • Improve shown info when there are no Locales missing Language Packs
  • Improve shown info when the translate.wp.org API is unreachable
  • Minor code improvements

1.0.0

  • Initial release.