Performant Translations

外掛說明

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

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

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

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

WordPress 6.5 及更新版本

重要提示:這個新功能會整合至 WordPress 6.5,但這個外掛會持續改進。

在 WordPress 6.5 或更新版本中,這個外掛會自動將現有的 .mo 檔案轉換成 .php 檔案,並僅會從 .php 檔案載入使用者介面本地化譯文。這對不是從 WordPress.org 下載的語言套件會非常實用。

螢幕擷圖

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

安裝方式

自動安裝

  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 計畫。

使用者評論

2024 年 4 月 11 日
What this plugin does is amazing! There were some issues that made my website slow. The website achieved a mobile page speed of 52. Blocked display for more than 10 seconds. I don’t have the technical knowledge to fix this in the code. This would have cost me around $600. I found this plugin and all errors were removed from the website with one click. I am incredibly happy with the result. And that with a free plugin! I knew it should be possible. Because I am so happy, I take the paid subscription! Thank you very much!
2024 年 1 月 21 日
Browsing the dashboard feels instant snappier, even if your hosting is already fast and performant – it still makes a difference!
2024 年 1 月 16 日
I’ve got a multi language site (with WPML) that has a huge performance problem. I was not able to figure out what is actually causing the performance problem, the main problem probably has nothing to do with i18n, this plugin still helps cause it significantely speeds up the translations, leaving the only bottleneck to be the unknown problem. Many thanks for your efforts!
2023 年 11 月 23 日
I tried this plugin on a couple of websites and I believe it makes my admin user experience a bit faster. Cached front end is fast as ever. It works great with Polylang, WooCommerce and Loco Translate. I like where this is going and I hope it gets implemented into the WP Core soon. Update:Duplicator (Pro) throws a runtime error when trying to make a backup while this plugin is activated. Temporarily disabling it solves the issue.
2023 年 10 月 23 日
My clients websites usually non-English, this extension makes faster their websites. I’m really greatful for this improvements.
閱讀全部 15 則使用者評論

參與者及開發者

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

參與者

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

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

對開發相關資訊感興趣?

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

變更記錄

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

1.2.0

  • This plugin now requires WordPress 6.5

1.1.2

  • Fixed a minor regression when assembling file paths to look up.

1.1.1

  • Fixed: Addressed a slight performance regression in 1.1.0.
  • Fixed: Addressed an issue with incorrect plural forms for certain locales.

1.1.0

  • Enhancement: Support for this functionality existing in WordPress 6.5.
  • Enhancement: Added hardening for file paths not being strings because of a faulty plugin filter.
  • Enhancement: Invalidate OPcache after writing PHP files.
  • Enhancement: Improve compatibility with pluralized strings referenced as singulars.

1.0.9

  • Enhancement: Improved compatibility with WPML string translation add-on.

1.0.8

  • Fixed: Added workaround for potential file permission issues.

1.0.7

  • Fixed: Prevent issue where not all core translations were updated.
  • Enhancement: Change the order translations are loaded in to improve backward compatibility.

1.0.6

  • Enhancement: Remove JSON file support.
  • Fixed: Add hardening when using translation file paths with symlinks.

1.0.5

  • Enhancement: Improved compatibility with Loco Translate to avoid duplicate files.

1.0.4

  • Enhancement: Several minor performance improvements.
  • Enhancement: Use different file extension (.mo.php instead of just .php) to prevent conflicts.
  • Enhancement: “Import” existing translation file if one is already loaded for a text domain.
  • Enhancement: Use WP Filesystem API if available.

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.