在 SharePoint Server 中规划变体

适用于:yes-img-132013 yes-img-162016 yes-img-192019 yes-img-seSubscription Edition yes-img-sopSharePoint in Microsoft 365

SharePoint Server 和 Microsoft 365 中的 SharePoint 中的变体功能通过将内容从源变体网站同步到每个目标变体网站,使不同网站上的特定受众可以使用内容。 目标变体网站上的内容可先转换到其他语言,然后再进行发布。 变体仅可用于使用发布网站模板之一创建的网站,或用于激活了 SharePoint Server 发布基础架构功能的网站。

本文包含有关您在发布网站集中使用变体时应考虑的重要事项的信息,还介绍了规划使用 SharePoint Server 中的变体的解决方案时所涉及的任务。 本文未提供变体的概述,未介绍如何使用变体,也未说明如何创建变体标签及层次结构。 有关变体的详细信息,请参阅SharePoint Server 中的变体概述

关于规划变体

本文所述的规划过程从介绍规划对 SharePoint Server 解决方案使用变体时应考虑的重要事项入手。 本文的剩余部分介绍了在 SharePoint Server 中使用变体时需要规划的步骤。 这些步骤包括:

  • 确定所需的变体并选择变体根网站。

  • 指定源变体网站并规划目标变体网站。

  • 决定将如何在目标源网站上创建网站、列表和页面

  • 规划如何安排变体计时器作业。

可以在变体规划工作表中记录此信息。

规划使用变体时应考虑的重要事项

规划在 SharePoint Server 解决方案中使用变体之前,应注意变体和其他 SharePoint Server 功能之间的交互。 本节包含有关规划在 SharePoint Server 解决方案中使用变体时应考虑的重要事项的信息。

内容审批

内容审批是具有审批者权限的网站成员用来控制内容发布的方法。 在内容审批中,在新的主要版本获准后,视为内容发布,这是因为主要版本是供拥有读取权限的用户查看。 变体网站的内容审批需要在源和目标变体网站上的页面库中进行主要和次要版本控制。 有关内容审批的详细信息,请参阅规划内容审批和日程安排 (SharePoint Server 2010)

在规划变体时,应考虑独特的内容审批因素:

  • 在源变体网站上,当提交页面以供审核后,系统会生成一封电子邮件,并使用以下列中储存的值按如下顺序将其发送至页面联系人:

    • Contact

    • 联系人电子邮件地址

    • Modified By

      注意

      Starting with the Contact field, each field is checked for contact information to which the notification can be sent. If the first field is empty, the next field is tried until contact information is found.

      页面经过审批且可以发布后,则启用到目标变体网站的同步。 可以配置变体设置,以手动或自动将内容同步到变体网站。

  • 在目标变体网站上,从源变体网站同步的页面将始终分配一个次要版本号。 If the page is new to the target site, it is assigned version 0.1. If the page already exists on the target variation site, the synced page is assigned the next available minor version number. 例如,如果某个目标变体网站具有版本号为 2.1 的页面,且该页面的新变体已同步到目标网站,则该页面变为版本 2.2。

  • If a page is published on the source variation site, when the page is synced to target variation sites, the Approval status is set to Draft. If Content Approval and Document Version History are enabled in the Pages library on target variation sites, the page must be approved on each target variation site before the page is available to readers.

注意

Changes made to content that originates on the source variation site can supersede changes made to the content on the target variation site. For example, if the source variation site is in one language and the target variation site is in another, the following situation might occur: An editor changes a localized page on the target variation site, assigning it a new minor version, 1.1. Then, a writer on the source variation site makes different changes to the same page, which is synced to the target variation site as version 1.2. This supersedes the version 1.1 changes to the page. In this example, an editor for the target variation site would have to restore the previous version of the page from the Version History, accept the new version, or use the View Changes button to view differences between the current version and previous versions of the page, and manually merge the new and previous versions into a new version. For more information about versioning, see Plan document versioning, content approval, and check-out controls in SharePoint 2013.

If you use site variations, you must plan your site navigation experience carefully. In SharePoint Server, site navigation links to the current site's peer sites are automatically generated and displayed in the Global Navigation and Current Navigation menus of a web page. In variation sites, where the current site's peers are variations of the same site, you might not want to give site users the ability to browse to other sites in this manner. You can use the Navigation Settings page to change the settings of the Global Navigation and Current Navigation menus so that peer sites are not displayed.

注意

[!注意] 对源变体网站上的网站导航所做的更改不会同步到目标变体网站。 如果您希望目标变体网站上的网站导航与源变体网站上的网站导航相匹配,则必须手动更改目标变体网站上的网站导航设置。

有关网站导航的详细信息,请参阅 SharePoint Server 中的站点导航概述

内容部署

内容部署可将内容从源网站集复制到目标网站集。

在变体创建层次结构作业定义运行时,建议您禁用包含源变体网站的所有内容部署作业。 如果变体创建层次结构作业定义计时器作业运行时,内容部署也在运行,则仅创建了一部分的目标变体网站可能会同步到目标服务器上的目标变体网站。

有关内容部署规划的详细信息,请参阅规划内容部署

跨网站发布

与将内容从源变体网站同步到目标变体网站的变体功能不同,跨网站发布功能使用搜索索引,以仅显示其他网站上的内容。 您可以将列表或库共享为由搜索服务进行索引的目录,然后将结果显示在其他页面 Web 部件的查询结果中和其他网站集中。

变体功能仅限于在单个网站集中同步内容。 但是,您可以在变体网站中将列表和库共享为目录。 然后可以创建任意数目的网站集,以表示变体标签,并将内容显示于这些网站集中。 这样,您可以针对不同变体标签拥有不同国家/地区代码顶级域。 例如,您可以拥有 contoso.co.uk 或 contoso.mx。

注意

[!注意] 跨网站发布仅可在 SharePoint Server 中使用。

有关跨网站发布的信息,请参阅在 SharePoint Server 中规划跨网站发布

有关如何在您想要在多语言跨网站发布网站上使用变体时规划网站体系结构的信息,请参阅在 SharePoint Server 中规划多语言跨网站发布网站的变体

Web 部件

Web 部件是基于 SharePoint Server 的页面构建基块之一。 大多数 Web 部件都用于显示数据的特定类型,如文本、HTML 或图像。 SharePoint Server 包括一组默认 Web 部件,您也可以开发或导入自定义 Web 部件。

Web Parts are synced with pages of variation sites. If Update Target Page Web Parts is enabled, Web Parts are updated only on the target variation site if a page that contains that Web Part is synced to the target variation site. If the Web Part appears on multiple target pages on different target variation sites, all instances of the Web Part are updated when the page from the source variation site is synced to the target variation sites. For example, if a page contains a Media Web Part, and the Web Part is configured to point to video A that is stored on a site outside the variations hierarchy, when the page is published on the source variation site, the page is synced to all target variation sites. The pages on the target variation sites display video A in the Media Web Part. If the page on the source variation site is updated and the Media Web Part is changed to point to video B, the pages on the target variation sites continue to point to video A until the page on the source variation site is published and synced to the target variation sites. Also, if readers on the target variation sites do not have permission to view the video file that is stored outside the variations hierarchy, they cannot view the video. 为了防止 Web 部件发生此类意外行为,您可以配置变体设置,使 Web 部件更新不同步到目标变体网站。

多语言网站

SharePoint Server 具有多种功能,使您可以为来自不同地区的用户或使用不同语言的用户提供支持。 您可以使用这些功能以不同语言创建网站,并使用户可以查看某种语言(而非网站创建时的语言)形式的网站用户界面。 如果您计划在多语言网站中使用变体,则必须执行更多步骤,以实现对变体网站的多语言支持。 有关如何计划多语言网站的详细信息,请参阅在 SharePoint Server 中规划多语言网站

确定所需变体

变体用于创建多语言网站及基于多区域差异的网站。 确定您的解决方案所需的变体,并列出将属于变体层次结构的网站。

如果您将要在 SharePoint Server 中使用变体创建多语言网站,且如果您希望目标变体网站的网站管理页面以其他语言显示,则您必须为与变体网站对应的每种语言安装语言包。 有关如何安装语言包的信息,请参阅安装或卸载用于 SharePoint Server 2016 的语言包。 如果要使用变体在 Microsoft 365 中的 SharePoint 中创建多语言网站,则会安装所有语言包并可供使用。

指定源变体网站

源变体网站是创作和发布由所有网站共享的内容的网站,也是用于将更改同步到目标变体网站的网站。 您创建的第一个变体标签自动指定为源变体网站。 一个变体层次结构只能有一个源变体网站。 指定了源变体网站后,将无法更改。

查看变体解决方案的网站列表,并决定哪个网站将作为源变体网站。 在变体规划工作表中" 变体数据表"选项卡的第一行记录解决方案的源变体网站。 输入以下列的信息:

  • 网站模板语言 用作默认用户界面语言的语言包名称。 例如,英语。 如果您未在目标网站上使用多语言用户界面,则将此列留空。

  • 区域设置 标签表示的区域设置。 例如,英语(美国)。

  • Variations home The location where the source and target variations will be created. The variation home site provides the URL for all variation sites and contains the landing page that redirects users to the correct variation site. The home site can be a site at any level in a site collection, including the top-level site. However, after you specify the home site, you cannot change it after you click Create Hierarchies, and you cannot use variations anywhere else in the site collection.

    若要指示网站集的首要网站,则键入斜线 (/)。

    注意

    如果主网站包含网站层次结构或您希望包含在源变体网站中的列表或页面库内容,则必须在创建它们之后将其手动复制到源变体网站。

  • 标签名称 将显示在 URL 中的名称。

  • 标签描述 对标签的描述。

  • 显示名称 将显示在网站导航中的名称。

  • 发布网站模板 用于创建源变体网站的网站模板。 键入 使用工作流发布网站或发布网站。

  • 标签联系人 变体网站的一个或多个联系人。

规划目标变体网站

查看变体层次结构的网站列表,并在变体规划工作表中记录各个目标变体网站。 对于每个网站,输入以下列的信息。

  • 网站模板语言 用作默认用户界面语言的语言包名称。 例如,德语。 如果您未在目标网站上使用多语言用户界面,则将此列留空。

  • 区域设置 标签表示的区域设置。 例如,德语(德国)。

  • 标签名称 将显示在 URL 中的名称。

  • 标签描述 对标签的描述。

  • 显示名称 将显示在网站导航中的名称。

  • 层次结构创建 源层次结构将同步到目标变体网站的部分。 键入以下信息之一:

    • 发布网站,具有变体的列表和所有页面

    • 仅限发布网站

    • 仅限根网站

  • 允许人工翻译 目标标签上是否允许人工翻译。 键入 Y 或 N。

  • 转换器语言 允许人工翻译时用于目标标签的转换器语言。

  • 允许机器翻译 目标标签上是否允许机器翻译。 键入 Y 或 N。

    注意

    如果服务器上未启用机器翻译服务,则机器翻译选项不可用。

  • 机器翻译语言 允许机器翻译时用于目标标签上的机器翻译语言。

  • 标签联系人 变体网站的一个或多个联系人。

注意

[!注意] SharePoint Server 支持最多 209 个变体标签。 Microsoft 365 中的 SharePoint 最多支持 50 个变体标签。

规划自定义母版页、布局页或样式表

您可以决定对变体网站使用自定义模板页、页面布局或样式表。 例如,您可能需要对语言从右到左读取的网站使用不同的母版页和页面布局。 母版页、页面布局和样式表仅在网站集的首要网站中进行管理。 因此,您必须如下表中所述,在首要网站的其中一个位置中对这些资源全部进行更改。

表:变体自定义的资源位置

Resource 位置
母版页
母版页样式库
布局页
母版页样式库
XSL 样式和级联样式表
样式库

目标页面可以具有独立于源变体网站的不同页面布局。 如果源网站上的页面布局发生更改,目标页面的页面布局也不会更改。

规划自定义内容类型

必须针对源变体网站页面库中存储的所有页面使用同一内容类型(页面内容类型或基于页面内容类型的内容类型)。 The easiest way to do this is to use a content type that is defined on the Site Content Type page in the top-level site of the site collection.

如果变体网站上的一个或多个页面必须具有自定义列,则将其添加到您在页面库中使用的内容类型。 例如,可以添加一个指示页面是否已本地化的列。 有关如何规划内容类型和列的详细信息,请参阅Plan content types and workflows in SharePoint 2013

决定将如何在目标变体网站上创建网站、列表和页面

如果在网站层次结构中,源变体网站的下方有其他网站,则必须规划将如何在目标变体网站上创建这些网站。 有两种方法可以在目标变体网站上创建网站:自动和手动。 默认情况下,添加到源变体网站下方的所有新网站将在所有目标变体网站上自动创建。 但是,如果禁用了变体的自动网站和页面自动创建,那么对于在源变体网站下方创建的每个新网站来说,必须手动指定应在哪个目标变体网站上创建网站。 尽管在目标变体网站上启用新网站自动创建具有减少网站管理员任务的优势,但手动网站创建的优势在于您可以指定应在哪些目标变体网站上创建哪些网站。 如果您希望仅在某些(而非所有)目标变体网站上包含某网站,这将非常有用。

对于列表和页面内容,必须对如何传播内容做出两个决定。

  1. 从源的角度来看,发布新内容时会出现什么情况? 您可以选择执行以下操作之一:
  • Automatically create a copy of the content in all target variation sites. This is the Create Everywhere option, and it is enabled by default.

  • Manually create a copy of the content in selected target variation sites. Subsequent updates to that content will be available automatically for the specified target variation sites. This is the Create Selectively option.

  1. 从目标的角度来看,提供新内容时会出现什么情况? 您可以选择执行以下操作之一:
  • 自动从源变体网站同步更改,并将其作为新草稿版本添加到目标变体网站上。

  • 通知目标标签所有者有更新可用。 标签所有者将决定是否手动同步内容。

By default, any new pages that are published in the Pages library of the source variation site will automatically be created on all target variation sites. However, if Create Selectively is enabled, for each new page that you create on the source variation site, you must manually specify the target variation site on which the page should be created. The Create Selectively option can be useful if you want certain pages to be included only on some, but not all, target variation sites.

Lists can be created automatically on target variation sites only if they are created on the source variation site before the variation hierarchy is created. If a list is created after the variations hierarchy is set up, a list must be created manually on the target variation sites by using the Settings button on the Variations tab on the ribbon for the list on the source variation site. However, new list items can be created automatically on a target variation site.

" 在任何位置创建"选项默认处于启用状态。 如果决定启用" 选择性创建"选项,应谨慎考虑可能会增加的管理任务。 可以在" 变体设置"页面上的"网站集管理"中配置与网站、列表和页面创建行为相关的设置。 有关信息,请参阅 创建多语言网站

规划变体计时器作业安排

变体功能使用计时器作业执行任务,如创建和传播网站和页面。 计时器作业在 OWSTIMER 中运行,它是用于 SharePoint Server 的 Windows 服务。 每个计时器作业都具有自己的关于何时运行作业的默认计划。 可以在 管理中心网站的" 作业定义"页面更改每个作业运行的频率。

注意

在 Microsoft 365 的 SharePoint 中,无法配置计时器作业。

下表列出了变体计时器作业和每个作业的默认安排。

表:变体计时器作业和默认安排

作业名称 默认安排
变体创建层次结构作业定义
每小时
变体传播列表项作业定义
每 15 分钟
变体传播页面作业定义
每 15 分钟
变体传播网站和列表作业定义
每 30 分钟

您可以将定期计划设置到每分钟、每小时、每天、每周或每隔一个月,从而指定每个作业运行的时间。 如果选择每天、每周或每月,则可以针对作业应运行的时间指定一个时段,服务器将随机选择指定范围中的一个时间开始运行作业。 此选项非常适用于在服务器场的多台服务器上运行的高负载作业。 请注意,如果同时在服务器场中的所有服务器上运行此类作业,可能会增加服务器负载并影响性能。 为避免这种可能性,可以指定作业的准确开始时间。

You should carefully plan when the variations timer jobs should run on your servers, and set the recurring schedule accordingly. For example, to determine how often the Variations Propagate List Items Job Definition or the Variations Propagate Page Job Definition should run and sync list items or pages to target variation sites, consider how many list items or pages will be created on the source variation site, and how often those list items or pages will be updated.

如果计划更改变体计时器作业的默认日程安排,请在变体规划工作表中的" 变体计时器作业"选项卡上记录每个计时器作业的新日程安排。

变体规划工作表

下载 Excel 版变体规划工作表

另请参阅

概念

SharePoint Server 中的变体概述