Performant Translations

外掛說明

這個外掛專案使用全新的方式處理 WordPress 的語言套件,這能讓本地化語言套件載入速度飛快。

依據〈深度分析國際化效能〉一文指出,會載入本地化語言套件的 WordPress 網站,速度明顯低於不需要載入語言套件的網站。

使用這個外掛提供的新方式載入語言套件,可以大幅降低額外負荷,讓網站恢復原有的速度。

如果網站使用的不是 [English (United States)],而是其他語言的語言套件,網站管理員僅需啟用外掛便能立即察覺網站速度的改進。

這個外掛的主要目的是讓這些改進更能能夠得到更廣泛的測試,最終目標是整合至 WordPress 核心程式中。

Performant Translations 支援多種檔案格式 (例如 .mo.php.json),並可同時載入多個 Text Domain 及地區語言。依據預設設定,這個外掛會將現有的 .mo 檔案轉換為 .php 檔案,並僅會載入 .php 檔案中的譯文。

螢幕擷圖

  • 顯示使用這個外掛達成的載入時間的圖表

安裝方式

自動安裝

  1. 前往 [外掛]→[安裝外掛]
  2. 搜尋「Performant Translations」
  3. 安裝並啟用 Performant Translations 外掛。

手動安裝

  1. 將外掛安裝套件解壓縮所得的 performant-translations 資料夾上傳至網站的 /wp-content/plugins/ 目錄。
  2. 前往 [外掛] 頁面。
  3. 啟用 Performant Translations 外掛。

常見問題集

這個外掛讓頁面載入速度變快的原理是什麼?

透過將 .mo 檔案轉換為 .php 檔案,剖析語言套件的速度便會變快。
此外,.php 檔案能儲存於稱為 OPcache 的快取中,這個機制可以提供額外的速度提升。

這個外掛可以使用於正式網站嗎?

這個外掛雖然目前仍為 Beta 測試版外掛,但它已通過測試,並已確認可使用於正式環境。
老話一句,使用任何外掛,風險必須自負。

這個外掛是否與其他多語外掛進行過測試?

是的。這個外掛與其他常見的多語外掛進行過測試,例如 WPML、Weglot、TranslatePress、MultilingualPress 及 Polylang。如果使用時持續遇到問題,請與我們聯絡。

啟用這個外掛前是否需要進行預先準備?

不需要。啟用外掛後,它便會開始執行,且使用者應該就能察覺網站速度的提升。使用這個外掛時如果遇到任何問題,請提出技術支援需求。

安裝外掛後,可以安全的移除這個外掛嗎?

可以。停用並將這個解除安裝後,由這個外掛產生的全部 .php 檔案,便會從伺服器移除。

如何為這個外掛做出貢獻?

非常感謝各位的各種貢獻!請參考核心程式效能團隊手冊以進一步了解參與的方式。

使用者可以在何處提交外掛意見反應?

如果對這個外掛有任何建議或新功能要求,請前往外掛的 GitHub 存放庫提出。

如果使用外掛需要進行疑難排解或有任何問題,請前往技術支援論壇提出。

在何處可以回報安全性問題?

如需回報安全性問題,請參考 WordPress HackerOne 計畫。

使用者評論

2023 年 9 月 10 日
Use it on a client site and we maintained under 1 second load times, which is on par with our other sites. Deserves 5 stars hands down.
2023 年 9 月 7 日
Installed this plugin to see what the effect is on my site. I am not yet 100% sure that it makes a big difference. But that all depends on the amount of texts used on your site. So far no bad experiences
2023 年 9 月 4 日
Thanks for the plugin. Anything that helps the performance of WordPress sites gets a thumbs up from me 🙂
閱讀全部 9 則使用者評論

參與者及開發者

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

參與者

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

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

對開發相關資訊感興趣?

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

變更記錄

For the plugin’s full changelog, please see the Releases page on GitHub.

1.0.3

  • Enhancement: Improved compatibility with Query Monitor’s developer tools panel.
  • Enhancement: Added new performant_translations_load_translation_file filter.
  • Enhancement: enforce network-only activation on Multisite.

1.0.2

  • Fixed: Add hardening for invalid values being passed to translation functions.

1.0.1

  • Enhancement: Regenerate translation files when Loco Translate updates MO files.
  • Fixed: Add hardening for invalid context being passed.
  • Fixed: Fix handling of locales without plurals, such as Persian.

1.0.0

  • Initial release.