Multisite Language Switcher

外掛說明

這是一個實用且簡單易用的外掛,它為 WordPress 多站網路 (例如多站網路中的子網域或子目錄網站) 新增多語內容功能。如果需要設定跨網域的多重網站,只要將網域名稱代管於同一台伺服器上,然後使用如 WordPress MU Domain Mapping 類似功能的外掛便可達成。

Multisite Language Switcher 能讓使用者管理文章、頁面、自訂內容類型、分類、 標籤及自訂分類法的譯文內容。

這個外掛使用了源自 FamFamFam 的旗幟圖示,由衷感謝 Mark James 的工作成果。此外,也必須感謝 Jürgen Mayer 為外掛製作的橫幅。

請記得為這個外掛評等,謝謝。

本地化人員

感謝全體本地化人員的卓越貢獻。

  • 德國德文 (de_DE):由 Dennis Ploetner 提供
  • 義大利文 (it_IT):由 Antonella Cucinelli 提供
  • 荷蘭文 (nl_NL):由 Alexandra Kleijn 提供
  • 巴西葡萄牙文 (pt_BR):由 Coolweb 提供
  • 西班牙西班牙文 (es_ES):由 Andreas Breitschopp 提供
  • 法國法文 (fr_FR):由 Andreas Breitschopp 提供
  • 俄文 (ru_RU):由 Andrey Vystavkin 提供
  • 烏克蘭文 (uk):由 Victor Melnichenko 提供
  • 克羅埃西亞文 (hr_HR):由 Brankec69 提供
  • 羅馬尼亞文 (ro_RO):由 Armand K 提供
  • 波蘭文 (pl_PL):由 Kamil Frejlich 提供
  • 立陶宛文 (lt_LT):由 Ovidijus Pukys 提供
  • 加泰羅尼亞文 (ca_ES):由 Joan López 提供
  • 捷克文 (cs_CZ):由 Rastr 提供
  • 匈牙利文 (hu_HU):由 RobiG 提供
  • 喬治亞文 (ka_GE):由 Jas Saran 提供
  • 希臘文 (el):由 Christoforos Aivazidis 提供
  • 塞爾維亞文 (sr_RS):由 Web Hosting Hub 提供
  • 土耳其文 (tr):由 Alican Cakil 提供
  • 亞美尼亞文 (hy_AM):由 Yeghishe Nersisyan 提供
  • 孟加拉文 (bn_BD):由 Md. Nazmul Huda 提供
  • 日文 (ja):由 ThemeBoy 提供
  • 瑞典文 (sv_SE):由 Erik Bernskiold 提供
  • 台灣繁體中文 (zh_TW) 及中國簡體中文 (zh_CN):分別由 Alex Lion (阿力獅) 及 DrBenson 提供
  • 阿拉伯文 (ar):由 Mohamed Elwan 提供
  • 挪威文 (nb_NO):由 Ibrahim Qraiqe 提供
  • 保加利亞文 (bg_BG):由 Vencislav Raev 提供
  • 墨西哥西班牙文 (es_MX):由 Fernando Mata 提供

如果有人為自己的母語完成了語言套件,或想要更新現有的語言套件,可以將 PO 及 MO 檔案傳送給我 (指開發者),這樣我便能將新版的語言套件封裝至 Multisite Language Switcher 中。使用者可以在這裡下載最新的 POT 譯文範本檔。

螢幕擷圖

  • 外掛設定
  • 文章清單
  • 編輯文章
  • 小工具

適用於區塊編輯器

這個外掛提供 1 個可供 Gutenberg/區塊編輯器使用的區塊。

  • Multisite Language Switcher

安裝方式

  • 下載外掛的安裝套件 ZIP 壓縮檔,並使用偏好的解壓縮程式解壓縮。
  • 將解壓縮得到的資料夾完整上傳至 WordPress 網站的 /wp-content/plugins 目錄中。
  • 在外掛管理頁面啟用這個外掛。多站網路管理員能為多站網路的全部子網站啟用外掛,或由個別子網站的網站管理員分別啟用外掛。
  • 多站網路的每個子網站都需要個別啟用外掛,並在 [設定]→[Multisite Language Switcher] 進行個別設定。

完成安裝後,網站便能…

  • 在 [文章]→[編輯] 或 [頁面]→[編輯] 中連結已完成翻譯的文章及頁面。
  • 在 [文章]→[分類] 或 [文章]→[標籤] 中連結已完成翻譯的分類及標籤。
  • 跨語言連結網站上的自訂內容類型及自訂分類法。
  • 如果有提供對應的翻譯內容,便能使用小工具、區塊編輯器的區塊、短代碼 [sc_msls]content_filter 向使用者顯示相關提示。
  • 使用小工具短代碼 [sc_msls_widget]
  • 在目前使用的佈景主題中直接插入 <?php if ( function_exists( 'the_msls' ) ) the_msls(); ?> 程式碼 (選用)。

查看 Multisite Language Switcher 官方網站以進一步了解相關資訊。

常見問題集

在 [一般] 設定頁面中沒有可供使用的 [網站介面語言] 選項。

請先查看這份官方文件中對你的母語的說明。

有需求要讓網站保持英文介面。

請在控制台的 [個人資料] 設定頁面選取個人要使用的網站語言介面。

是否真的需要使用多站網路?

是否建置多站網路取決於網站管理員,但是如果要使用 Multisite Language Switcher,就必須採用多站網路。

如何依據使用者的瀏覽器偏好語言將使用者重新導向至對應的語言網站?

Multisite Language Switcher 無法自動將使用者重新導向至對應的偏好語言網站,我 (指外掛開發者) 也不確定外掛是否應該具備這樣的功能。如果需要這個功能,可以參考這個 jQuery 外掛或能達成這個目標的佈景主題

如何在網站上將 Multisite Language Switcher 的功能加入導覽選單中?

請參考 MslsMenu 附加元件外掛。

如何在網站上將 Multisite Language Switcher 的功能加入 HTML 選取功能中?

請參考 MslsSelect 附加元件外掛。

不想上傳相同的媒體檔案至多站網路中的每一個網站,該如何達成這個目的?

請參考 Network Shared Media,這個外掛會在 [新增檔案] 頁面中新增新分頁,讓使用者可以在多站網路中存取其他子網站的媒體檔案。

是否有可以呼叫取得訪客目前檢視頁面的語言資訊的函式?

網站管理員應該使用 WordPress API 函式 get_locale(),但也可以使用下列程式碼:

use lloc\Msls\MslsBlogCollection;

$blog     = MslsBlogCollection::instance()->get_current_blog();
$language = $blog->get_language();

網站是否能從 WPML 移轉至 MSLS?

這個外掛可以達成這個需求。

使用者評論

2023 年 11 月 13 日 1 則留言
This is a fantastic plugin: it does exactly what promises to do, it's not bloated with extra features and it's been around for a long time. I can't thank the plugin author enough for developing this plugin, maintaining it for years and having the patience to deal with occasional 1-star reviews from people who can't be bothered to read the docs.
2023 年 11 月 7 日 1 則留言
I'm not keen to write reviews, but in this case I was so overwhelmed of this plugin's simple features and ease of use that I had to. This is by far THE easiest multisite multilanguage plugin I ever tried. Over the years I tested several multilingual approachs (plugins for standalone WP sites, multisite "premium" plugins, country domains, etc.). But this here exceeds all my expectactions for its simplicity. Multilanguage should not be an option in WordPress, but part of the core, out of the box. This plugin deserves a 10 of 10. Two thumbs way up! Thank you for this peace of art.
2023 年 3 月 29 日
I am very happy with the plugin's operation - it is extremely easy to use and does not cause any problems.Works with WordPress Multisite great! However, there is a feature missing from the plugin that has already been popping up on the web, namely support for reciprocal hreflang (return tag: which is missing Missing x-default). When I audit any page with this plugin, I get "Missing reciprocal hreflang (no return-tag)", you can find info at Ahrefs site ""Missing reciprocal hreflang (no return-tag)" error in Site Audit" I will be very grateful if this functionality is added :)As I can see this needs to add one line of code 🙂 Greeting from PolandPaweł
2023 年 3 月 10 日
highly customizable, high performance, indispensable – thanks a lot. theo
2023 年 1 月 30 日 1 則留言
Thank you for creating and maintain the great plugin. Thank you so much.
閱讀全部 92 則使用者評論

參與者及開發者

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

參與者

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

將〈Multisite Language Switcher〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

如有需要,請參考這個外掛專案的獨立變更記錄