在 SharePoint Server 中規劃多語使用者介面

適用于:是-img-13 2013是-img-16 2016是-img-19 2019是-img-se訂閱版本 是-img-sopMicrosoft 365 中的 SharePoint

多語系使用者介面 (MUI) 功能可讓使用者以偏好的語言顯示 SharePoint Server 或 Microsoft 365 中 SharePoint 網站的使用者介面,而不是建立網站時選取的預設語言。 本文說明如何使用 MUI 功能以及其帶來的好處,解釋該功能的運作方式,並且列出功能支援的其他功能。 此外,本文也說明如何新增及編輯應用程式內容,以及如何匯出與匯入需要翻譯的內容。 文中說明如何透過受管理的中繼資料使用 MUI 功能,並說明該功能的限制。 最後,本文說明如何在 SharePoint Server 的網站解決方案中規劃使用 MUI 功能。

如需如何規劃多語系網站的資訊,請參閱 規劃 SharePoint Server 中的多語系網站

多語使用者介面的運作方式

建立新網站時,預設會以伺服器上 SharePoint Server 安裝的預設語言建立。 伺服器陣列管理員必須在 SharePoint 伺服器陣列的所有 Web 和應用程式伺服器上安裝語言套件,才能以預設語言之外的語言建立網站。 如需詳細資訊,請參閱 安裝或卸載 SharePoint Server 2016 和 2019 的語言 套件和 安裝或卸載 SharePoint 2013 的語言套件

After language packs are installed on the server, the Language settings link is added to the Site Settings page. Site collection administrators and site owners use the Language Settings page to specify which alternate languages the site will support. After the site collection administrator or site owner has enabled alternate languages for a site, the next time that a user logs on to the site, SharePoint Server uses one of the following rules to determine the language in which to display content to the user:

  1. 若 SharePoint Server 伺服器陣列已啟用使用者設定檔服務應用程式,則會採用使用者設定檔中所儲存的語言偏好。 如需如何在 SharePoint Server 中將語言清單新增至使用者設定檔設定的資訊,請參閱 在 SharePoint Server 使用者設定檔中新增、編輯或刪除自訂屬性。 如需如何在 SharePoint 管理員中心將語言清單新增至使用者設定檔設定的資訊,請參閱新增和編輯使用者設定檔屬性

  2. 如果使用者設定檔中尚未定義語言偏好,則會採用網站集合的使用者語言設定中儲存的語言偏好。

  3. 網站集合使用者語言設定尚未定義語言偏好,則採用儲存於使用者網頁瀏覽器的語言偏好。

  4. 使用者網頁瀏覽器中沒有語言偏好的相關定義,則使用預設的網站語言。

MUI 功能只會以使用者慣用的語言顯示網站的使用者介面元素。 它不會以替代語言翻譯內容或顯示檔或清單專案等內容。 若要翻譯網頁內容,您可以在 SharePoint Server 或 Microsoft 365 中的 SharePoint 中使用變化功能。

SharePoint Server 提供三種方法,可用來變更特定應用程式內容,例如清單或文件庫標題和描述:使用使用者介面、匯出和匯入網站的翻譯,以及使用Microsoft.SharePoint命名空間中的SPUserResource類別。 並非所有使用者介面元素都可以直接在使用者介面中變更。 例如,使用者動作和命令只能使用 SPUserResource 類別來變更。 如需詳細資訊,請參閱 SPUserResource 類別

如需如何安裝語言套件的資訊,請參閱 安裝或卸載 SharePoint Server 2016 和 2019 的語言套件。 如需了解如何讓個別使用者變更用以顯示其網站使用者介面的語言,請參閱<選擇網站使用者介面可以使用的語言>。

多語使用者介面功能的使用與好處

無論網站建立時選取哪種語言,MUI 功能可讓使用者使用自己偏好的其他語言,在單一網站上和其他人共同作業。 例如,網站的預設語言可能是英文,而偏好法文的使用者可以使用法文檢視網站, 偏好西班牙文的使用者則可以使用西班牙文檢視網站。

When you create a site and install language packs on all the web and application servers, you can specify the default site language. The site will use that language to display the site's user interface, such as site navigation and administrative pages. If you want to enable site users to view the site's user interface in a preferred language, you can use the Language Settings page to specify alternate languages that you want to make available to users. When a user logs on to the site, the users preferred language is used to display the site's user interface. All sites within that domain name are displayed in the user's preferred language. This does not change the default site language. Other users who view the site see the site's user interface displayed either in the default site language or in their preferred language. The site's user interface is changed only for those users who have specified a preferred language in which to view the site.

小組成員可透過 MUI 功能,使用共用的語言編輯文件及專案,同時以自己偏好的語言檢視網站與執行工作。 除了可讓小組共同作業之外,MUI 功能也能讓伺服器陣列和網站集合的管理員及網站擁有者以其偏好的語言執行管理工作。 例如,伺服器陣列管理員可使用偏好的語言檢視 SharePoint 管理中心網站 上的管理連結和指示。

MUI 功能也可讓使用者變更新的和現有的應用程式內容,例如清單或文件庫標題和描述,並可讓使用者將這些變更反映在其他語言使用者的使用者介面中。 例如,使用英文做為慣用語言的小組成員會建立名為「Team Reports」 的新文件庫。另一位將慣用語言設定為德文的小組成員登入網站,並將文件庫標題變更為 「Mannschaftsberichte」。下次將慣用語言設定為德文的使用者登入網站時,文件庫的名稱會顯示為 「Mannschaftsberichte」。但是,將慣用語言設定為英文的使用者仍會看到文件庫名稱顯示為「小組報告」。

多語使用者介面的支援項目

使用者以偏好語言檢視網站時,特定的使用者介面元素會以該偏好語言顯示。 一般而言,多數的使用者介面元素都能以偏好語言顯示,但使用者建立的內容則為例外。 以下清單列出的項目範例都可受 MUI 功能支援:

  • 設定頁面,例如 the _layouts and the _admin 虛擬目錄中的頁面。

  • SharePoint 描述。

  • 應用程式內容,例如選單、控制項、網站動作、網站標題和描述,清單或文件庫標題與描述、上方連結列連結、快速啟動連結、本機階層連結、網站與清單內容類型,以及網站和清單欄。

  • 開發人員內容,例如功能和解決方案。

  • 清單檢視。

  • 網頁組件標題、描述、自訂屬性和匯入錯誤訊息。

  • 部落格網站範本。

並非所有使用者介面元素都會以偏好語言顯示。 以下清單列出的項目範例都不受 MUI 功能支援:

  • 全域階層連結。

  • 使用者建立的內容,例如清單項目資料、文件庫中的文件和網頁、自訂權限等級及群組。

如需不受 MUI 功能支援之使用者介面元素的詳細資訊,請參閱<多語使用者介面的限制>。

管理應用程式內容

應用程式內容包含選單、控制項、網站動作、網站標題和描述,清單或文件庫標題與描述、上方連結列連結、快速啟動連結、本機階層連結、網站與清單內容類型,以及網站和清單欄等內容。 MUI 功能可讓使用者以預設的網站語言或者一種或多種其他語言新增或編輯應用程式內容。 您也可以選擇匯出及匯入應用程式內容,以便大量翻譯。

新增與編輯應用程式內容

使用者新增或編輯應用程式內容時,會套用以下規則:

  • 使用者以預設的網站語言檢視網站時,其建立的任何新應用程式內容都會以預設的網站語言顯示,即使他們以其他語言檢視網站也是如此。

    例如,假設預設的網站語言為英文,使用者以英文檢視網站,並且建立名為 "Team Documents" 的新文件庫。當使用者以法文檢視該網站時,該文件庫標題仍然會顯示為 "Team Documents"。

  • 使用者以其他語言檢視網站時,其建立的任何新應用程式內容都會以該語言顯示,即使他們以預設的網站語言或其他任何語言檢視網站也是如此。

    For example, if the default site language is English, and a user views the site in German and adds a document library named "Mannschaftsdokumente," the library title is displayed as "Mannschaftsdokumente" even when the site is viewed in English. To translate application content, such as a document library title into the default site language or into an alternate language, users must first change the language preference either in their user profile, or in their web browser settings, to display the site in the language they want to use, and then change the user interface string. The exception to this behavior is if the Overwrite Translations option is enabled. For more information, see Overwriting translated application content.

當網站以使用者慣用的語言顯示時,對現有應用程式內容字串所做的任何變更只會針對該語言進行變更。 與預設網站語言和任何替代語言中的特定應用程式內容相關聯的字串會保持不變。 若要將應用程式內容字串,例如文件庫標題轉譯成預設網站語言或任何替代語言,使用者必須變更瀏覽器或使用者設定檔中的語言喜好設定,以預設或切換語言顯示網站,然後變更使用者介面字串。

覆寫已翻譯的應用程式內容

The Language Settings page contains an Overwrite Translations option that affects how changes to existing application content are made to other languages for the site. If the Overwrite Translations option is enabled, any changes that are made to the user interface in the default site language will overwrite any changes that were made to those same user interface elements in switch languages.

By default, when a user views a site in the default site language, any changes that are made to existing application content are changed for the default site language only. The strings that are associated with specific application content in the alternate languages remain unchanged. If the Overwrite Translations option is enabled, the strings that are associated with that application content for every language are replaced with the new default site language string. For example, if the default site language is English and a user changes the title of the "Shared Documents" library to "Team Documents," by default, the title is changed only for the default site language. If the Overwrite Translations option is enabled, the title is changed to "Team Documents" for every alternate language, and it must be re-translated.

匯出與匯入已翻譯的應用程式內容

The MUI feature lets you export and import application content for bulk translation. Instead of translating application content one item at a time, you can export the strings for any new or changed application content in the default site language or in one of the alternate languages. To export content, you use the Export Translations link on the Site Settings page. When you export application content for an alternate language, you can choose to export all content or only content that has not been translated.

When the application content is exported, it is saved as a .resx file, which can be opened by using a text editor or any third-party tool that can open resource files. For more information, see Resources in .resx File Format. After the resource strings are translated, you use the Import Translations link on the Site Settings page to import the .resx file.

透過 Managed Metadata 使用多語使用者介面

您可以建立多種語言的受管理的中繼資料,並與 SharePoint Server 解決方案一同使用。 藉由使用字詞庫管理工具,可以建立字詞組並關聯多個索引標籤,每個索引標籤都有您想支援語言的版本,而字詞組中的每個字詞都與索引標籤相關聯。 當使用者以其偏好的語言檢視網站時,字詞會透過使用偏好語言的對應索引標籤顯示。

多語使用者介面的限制

如先前所述,某些使用者介面元素並未啟用 MUI,也就是說,MUI 功能不支援它們。 本節說明搭配共用元件和網站範本使用 MUI 功能時所適用的其他限制。

共用元件

諸如清單和權限等共用元件會出現在所有網站範本上。 這些共用元件的功能經過集中定義,無論其出現的網站範本為何,其行為都會保持一致。

清單

清單檢視可透過 MUI 加以啟用,但清單項目不行,因為後者是使用者建立的內容。 無論使用者偏好的語言為何,清單項目都將持續顯示其建立時所輸入的值。

權限

下列與許可權相關聯的屬性未啟用 MUI。 它們一律會以預設的網站語言或建立它們的語言顯示:

  • 權限群組名稱 包含預設的權限群組名稱和使用者建立的任何自訂權限群組。

  • 自訂權限層級名稱和描述 包含使用者建立或變更的任何自訂權限層級。

  • 使用者資訊 例如「關於我」、「標題」和「部門」。

搜尋網站範本

其實,許多搜尋網站的限制都與 MUI 功能無關,但卻都是足以影響使用者介面的架構設計。 以下 MUI 和架構上的限制造就了搜尋網站的限制:

  • 搜索 搜尋會以 SharePoint Server 安裝的預設語言為內容編制索引。 即使內容是以替代語言提供,該內容也只能使用預設的網站語言進行搜尋。 例如,如果您慣用的語言是德文,而預設的網站語言是英文,則搜尋 「Freigegebene Dokumente」 不會傳回任何結果。 搜尋「共用文件」會傳回結果。

  • 搜尋網頁組件屬性 標題、描述和自訂屬性都可透過 MUI 加以啟用。 不過,如果搜尋方塊的預設搜尋提示字元經過自訂,則無論語言為何,都將顯示該自訂值。

  • 精簡搜尋面板網頁組件 精簡搜尋面板網頁組件不可透過 MUI 加以啟用。 精簡搜尋面板網頁組件中顯示的字詞儲存索引標籤,永遠都會顯示在搜尋索引中,不過只能以預設的網站語言儲存項目。 例如,假設您的偏好語言為義大利文,預設的網站語言為英文,而您有份文件使用的字詞儲存索引標籤包含兩種語言值,則精簡搜尋面板網頁組件只會顯示英文的索引標籤。

    注意事項

    這不會套用至分類精簡搜尋面板網頁組件,該組件會顯示受管理導覽使用的相同語言索引標籤。

規劃使用多語使用者介面

規劃將 MUI 功能和 SharePoint Server 網站搭配使用,其中網站需包含以下工作:

  • 決定網站語言需求。

  • 規劃安裝公用更新。

  • 規劃翻譯應用程式內容。

決定網站語言需求

在 SharePoint Server 網站中使用 MUI 功能之前,伺服器陣列管理員必須在所有 Web 和應用程式伺服器上安裝語言套件,以供網站使用。 決定需要的語言套件以及安裝在伺服器上的時機。 網站集合管理員或網站擁有者必須為各個網站設定語言設定,讓網站使用者可以使用特定語言。 您必須決定每個網站需要的語言,並規劃讓網站集合管理員或網站擁有者為其管理的網站啟用特定語言。 如需規劃多語系網站的資訊,請參閱<在 SharePoint Server 中規劃多語系網站>。 如需如何安裝語言套件的資訊,請參閱 安裝或卸載 SharePoint Server 2016 和 2019 的語言 套件和 安裝或卸載 SharePoint 2013 的語言套件

規劃安裝公用更新

若以適用於 SharePoint Server 之公用更新部分的方式更新語言套件,安裝公用更新時,您必須更新伺服器上的語言套件。 您應該規劃與伺服器陣列管理員合作,隨時注意推出的公用更新和任何關聯的語言套件,如此您才能知道必須為使用者安裝哪些更新的語言套件。

規劃翻譯應用程式內容

如果您預計在網站上啟用 MUI 功能,讓使用者使用其偏好語言時還能與其他人共同作業,您必須決定預設的 MUI 功能是否足夠或應用程式內容是否需要翻譯。 如果您有必須翻譯的應用程式內容,則應該考慮以下問題:

  • 如何翻譯現有和新的應用程式內容? 個別小組成員將視需求在使用者介面內直接翻譯應用程式內容,或是您將以網站需要的語言匯出資源檔案,再一次全部翻譯? 如果使用者以其他語言建立新的應用程式內容,您必須規劃人選,將該內容翻譯成預設網站語言和各種備用語言。 如果您預計建立複雜的頁面 (例如新的選單頁面) 或開發自訂的解決方案 (例如用以建立清單的功能),您必須規劃使用物件模型,以提供備用語言的翻譯。

  • 應用程式內容由誰翻譯? 資源檔案會由貴組織的人員翻譯,或是交由第三方翻譯?

  • 如何處理應用程式內容的更新? 使用者介面的變更是否會在進行變更時轉譯,還是會定期進行變更? 這可能取決於網站的大小和規模,以及包含的內容。

  • How should translation overwrites be handled? Do you want changes in the default site language to overwrite string values in alternate languages? If so, then you must enable the Overwrite Translations option on the Language Settings page.

  • 哪些欄的名稱必須變更? 哪些欄的名稱必須翻譯,又應翻譯成哪些語言? 這些欄名稱屬於清單層級或網站層級?

另請參閱

概念

在 SharePoint Server 中規劃多語系網站

SharePoint Server 中的變化概觀

在 SharePoint Server 中規劃變化

其他資源

SharePoint Server 2019 的語言套件

SharePoint Server 2016 的語言套件

SharePoint Server 2013 的語言套件