Working with Variations


When you design an Internet-facing website or corporate intranet, you may need to present it in multiple languages. This may simply mean providing users access to documents in multiple languages, or you may need all your content - web page and interface elements - in multiple languages. In the latter case, if your content is in one language, such as English, you must translate documents into other languages, but the system should support and manage this process.

SharePoint 2007 introduces the Variations feature, which you can use to create a website hierarchy for content in multiple languages. For example, the site may be where customers from multiple languages can view information about the Company’s products and services, or a corporate intranet site where employees live in different regions of the world and need access to information in their primary languages. Although variations do not actually translate the content for you, it starts a workflow that helps you do this work. Basically, you create content in a source language and then provision the content out to other sites, which represent the other required languages. This happens via workflow, which also notifies appropriate users that they are required to perform the translations. Figure 13-4 represents a site hierarchy with support for English and French versions of the website. Besides English and French, Variations can support any other languages, such as Spanish, Japanese, and German.

image from book
Figure 13-4

In this section, you learn how Variations work, including how to enable this feature. You then learn how to create labels for each language on your site, and then how to manage the workflow so that you have all the pieces you need for a working site with multiple language pages.

How Do Variations Work?

After login, the site version that users see is determined by their preferred language setting in their browser, as shown in Figure 13-5. If for some reason, a user has a requirement to change the site language to something other than their default language, he may do so using the Language Selection control, shown in Figure 13-6. If that page does not exist or is not published yet, he is directed to the next page in the site hierarchy - basically the parent page.

image from book
Figure 13-5

image from book
Figure 13-6

For a site to become available in multiple languages, you must first enable the Publishing feature. By default, the Internet-facing publishing site and Collaboration Publishing Site templates have this feature enabled. Enabling variations on a Publishing site, site collection is fairly simple in comparison to the benefit and functionality it provides an organization. In the next example, you configure a site collection to support this feature. You use the Ski Company site for this example.

Try It Out-Enable Variations on a Site Collection

image from book

Your ski company has customers throughout the United States and Canada, which means you need content in both English and French. To do this, you enable the Variations feature. Because this functionality applies to the entire site collection, you enable this feature from the Site Collection Administration page.

The Variation Settings window has several options. In this example, you start your variations at the root of your site collection, subsequently making English your main language variation. Then you opt to automate the creation of pages for other languages. This means that if you create a new page on the English site, a new page is automatically created in the French site. You then select to recreate any deleted target pages when you republish the source page. You also opt to have Web Part modifications made in one site carry over into the second site. Whether you decide to update Web Parts has to do with the level of Web Part customization you plan to do between languages. For example, if you want unique views available on a product’s Web Part for each language, you may opt not to update Web Parts so that the English Web Part doesn’t overwrite changes you want on the French Web Part. Finally, you choose to send an email when variation pages have been updated, and choose to share resources with the source variation rather than creating new copies.

  1. From the Ski Company Internet website, select Site Settings and then Modify All Site Settings from the Site Actions menu.

  2. From the Site Collection Administration group, select Variations. The Variation Settings window appears, as shown in Figure 13-7.

    image from book
    Figure 13-7

  1. You must specify the location for your variations to start. In this case, because you want the variations to start at the root of the site collection, you enter /.

  2. Select the option to automatically create site and page variations. This ensures that all new sites created in the source site are created in the other languages as well.

  3. Select the option to recreate a new target page when the source page is republished.

  4. Select the option to update Web Part changes to target pages when variation source page update is propagated.

  5. Keep the option checked to send email notification to owners when a new site or page is created or a page is updated by the variation system.

  6. Select the option to reference existing resources from the variation pages.

  7. Click the OK button.

How It Works

Variations is enabled for your site collections with the options you selected in this exercise. Once you enable Variations, the next step is to create labels to represent the sites for the various languages you want to support. This is the subject of the next section of the chapter.

image from book

Understanding Labels

In variations, you create a label for each language you want to represent within the site collection. The label defines the language of the site, the display name, the locale, as well as the hierarchy and source hierarchy.

  • Label and Description:   Because the majority of your customers speak English, you start with the English site label. This means that content is created in the English language first, and then the workflow copies any pages created in English to the French site hierarchy and queues them for translation

  • Display Name:   You next define the display name for each site hierarchy. This is the name as it displays in the navigation menu. You generally make the display name the name of the language as it would appear to native speakers so they can recognize it and select it. For example, for the French display name, you enter Français, which is the word for “French” in the French language. This is particularly helpful for viewing the structure of the site in reports such as the Site Content and Structure shown in Figure 13-8.

    image from book
    Figure 13-8

  • Locale:   This further tailors your site to reflect the nuances in variations on the same language. For example, you can define whether your French-speaking audience is French Canadian or from France. Likewise, you can distinguish between an English speaker from the United States and a speaker from Great Britain.

  • Hierarchy Creation:   For each language you want to represent on your website, a sub hierarchy is created below the root site.

  • Source Variation:   You must choose the main language for your variations. This will be the initial language in which all content is created before translation and should be based on the majority of your user’s first language.

Try It Out-Create Labels for Each Language

image from book

In this example, you create labels for each of the languages in which you want your Ski Company site available. Each label represents a major language, which in turn represents a unique site hierarchy containing all the elements related to that language. In this example, you make the Ski Company site available in both English and French, but you can expand into other languages later by adding additional labels.

  1. Return to the site settings page of your site collection. You may already be there based on completion of the previous exercise.

  2. Select Variation Labels from the Site Collection Administration links.

  3. Click the New Label button from the toolbar. The Create Variation Label window appears as shown in Figure 13-9.

    image from book
    Figure 13-9

  4. Because the first language you define is English, enter EN for the Label name.

  5. For Display Name, enter English. This is the value that end users see on the site.

  6. Specify the locale of the site to be English (United States).

  7. Specify the language to be English.

  8. For Hierarchy Creation, select Publishing Sites and All Pages.

  9. Select the check box to make the current label the source label. A message window appears to advise you that this action cannot be undone. Click OK to continue.

  10. For Publishing Site Template, select Publishing Site with Workflow, as shown in Figure 13-9.

  11. Click the OK button.

  12. Select New Label from the toolbar.

  13. Enter FR for the Label Name.

  14. For Display Name, enter Français.

  1. Specify the locale of the site to be French (Canada). You do this because you expect that many of the French visitors to your site are French Canadian.

  2. Specify the language to be French.

  3. Click the OK button.

  4. From the Variation Labels Management page, click the Create Hierarchies link from the toolbar as shown in Figure 13-10.

    image from book
    Figure 13-10

How It Works

Depending on the language preference that a user has set in the browser, a user is taken to the site with the appropriate language, which in this example is English. If user defines a language preference that does not exist on the site, she is redirected to the source language.

In this example, although you created labels for two languages, you can still add new languages later. So, if you were to develop a requirement to offer the Ski Company website in Spanish, you could do so by creating a label for Spanish and then clicking the Create Hierarchies link again. Any content contained in your English site, which is the source site, would be copied into the Spanish site and queued for translation.

image from book

Managing Translation Workflows

To ensure that pages are translated into the required language of the destination sites as they are created, you can tie your site to a special workflow. As the last two sections showed, pages are automatically created in the language of the source site. The process works something like this: You create content for the source language page. When you check the page in, this automatically launches an approval process. The group that is to approve the page is automatically notified and a task is assigned in their task list. When the source language page is approved, Variations automatically creates the pages for other languages, and email notifications are sent to translators notifying them that new content has been added to their sites. They translate the page to the appropriate language, and upon checking in the page start a second approval process.

This section features three Try It Outs that show you the inner workings of the workflow. In the first Try It Out, you create a new page in the source site, which is English. The page is created in the French site, and both sites go through the content editing and approval stages. In the second Try It Out, you create the site’s hierarchy by through a series of subsites that reflect the two main sections of the website:

  • About Us

  • Products

Finally, in the third Try It Out, you move the Press Releases site from the root structure of the site into the English version of your site. Once you do this, SharePoint automatically creates a French version of the Press Releases site, just as it did with the Products, About Us, and Custom Contact page from the first and second Try It Outs.

Try It Out-Create a New Page in the Source Site

image from book

In this example, you create a contact information page in your English site and check it back into the system to launch an approval workflow. Because you are members of the approvers group, you would normally receive an email notification and task assignment, but for the sake of this example, you can clearly see that the page is pending approval based on the Approve and Reject buttons that were displayed in the toolbar.

Tip 

For more on email notifications, the check-in and check-out process, workflows, and task assignments, see Chapters 3 and 5.

  1. From the home page of your Ski Company site, select Site Actions image from book Create Page from the menu.

  1. Enter Contact Us for the title of the page.

  2. From the page templates, click Article Page with Summary Links.

  3. Click the Create button. You are redirected to an empty page.

  4. Enter some content into the page and select Check In from the Page drop-down menu, as shown in Figure 13-11.

    image from book
    Figure 13-11

  5. Select that you want to publish a major version and add some comments, as these will be useful to you and others later when reviewing the page’s version history as discussed in Chapter 3.

  6. Click the OK button.

  7. Click the Start button to launch the approval workflow process.

  8. When the page reloads, select the Approve button from the Page Editing toolbar.

  9. On the Approval page, select the Approve button. The Contact Us page automatically appears in the navigation.

  10. Select the link to visit the French version of the site.

  11. Select the Contact Us page link in the French site.

How It Works

Notice the page is in a draft version and not checked in. Upon approval of the English page, the French page for Contact Us is created, and content owners from the French site receive email notifications. They can edit a draft page that the system creates, and then publish the page. Content approval workflows are also launched for this page, and the approvers of this page are notified.

image from book

Try It Out-Create a Site Hierarchy of Publishing Sites

image from book

In this example, you walk through the steps of creating two subsites for your publishing site collection. For the first site, you use the Create Site command from the Site Actions menu, which is the easiest way to create a single site from within a publishing site. Notice that this option along with several others on the Site Actions menu did not exist in the previous examples when you worked on sites without the Publishing feature enabled.

Because you need to create multiple subsites, you should use the Manage Content and Structure interface, shown in this example. From this interface, you can activate many administrative functions such as copying or moving a site, or creating new content. In addition, you can manage security or content across multiple sites very conveniently from this section. The Site Content and Structure window, shown in Figure 13-14, provides a good visual diagram of the entire site collection and its various content elements.

  1. From the main page of your newly created Ski Company site, select Site Actions image from book Create Site, as shown in Figure 13-12. The New SharePoint Site window appears as shown in Figure 13-13.

    image from book
    Figure 13-12

    image from book
    Figure 13-13

  1. Enter a title and URL for the site. For this example, enter About Us for the title and aboutus for the URL.

  2. Select the Publishing Site with Workflow template.

  3. Select the option to use the same permissions as parent site.

  4. Select the Yes option for Use the Top Link Bar from the Parent Site.

  5. Click the Create button. You are redirected to your newly created subsite for About Us.

  6. Click the site logo to return to the home page of the top-level site.

  7. Select Site Actions image from book Manage Content and Structure. The Site Content and Structure window appears, as shown in Figure 13-14.

    image from book
    Figure 13-14

  8. Select New image from book Site from the toolbar.

  9. Repeat steps 2 through 6, but this time, enter Products for the Title and products for the URL Name in step 2.

How It Works

As you create the new sites, these sites are also created in the French version of your site. The Site Content and Structure view will clearly outline the hierarchy of your site including the multilingual branches

image from book

Try It Out-Move a Site Within a Site Collection

image from book

From the Manage Content and Structure section, you can perform many administrative functions such as moving sites. In this example, you move the Press Releases site under the English site hierarchy.

  1. From the home page of your Ski Company site, select Site Actions image from book Manage Content and Structure. The Site Content and Structure window appears.

  2. Hover your mouse over the Press Releases site to expose the Administrative drop-down menu.

  3. Select the Move option. The Move – Webpage Dialog appears, as shown in Figure 13-15.

    image from book
    Figure 13-15

  4. Select the English site.

  5. Click the OK button.

How It Works

Figure 13-16 shows how the site hierarchy looks with the creation of the additional subsites in both languages.

image from book
Figure 13-16

Because Variations is enabled, moving the site triggers the creation of the Press Releases site under the French hierarchy. At this point, French content translators can go into the French version of the site and rename pages and update content to reflect the appropriate language.

image from book




Beginning SharePoint 2007. Building Team Solutions with MOSS 2007
Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 (Programmer to Programmer)
ISBN: 0470124490
EAN: 2147483647
Year: 2007
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net