Chapter 23

Using Variations in Publishing Sites

In some cases you may want to publish pages or indeed entire sites in multiple languages. Or perhaps you want to give your users the option to view a site in a particular language. With SharePoint 2010 you can do these things using variations. SharePoint of course cannot translate content for you; what it can do is help you organize the content to allow your users to choose the language they prefer once the content has been translated. For completeness, the variations process is not restricted to different languages. It can be used to provide many different types of content to a variety of audiences or, for that matter, to different devices such as different types of smartphones.

Variations

Variations enable you to configure multiple sites within a SharePoint publishing portal, specifying one as the core content site and automatically or manually copying content to other specified sites, where it can be translated into the language or languages required. In order to use variations, you must enable the SharePoint publishing features for the site collection.

Variations are not available with standard SharePoint 2010 Team Sites. You can, however, use another feature of SharePoint 2010 to give users access to content in other languages: this is the Multilingual User Interface (MUI), which was introduced with SharePoint 2010. The MUI will enable you to change the display language used by sites, but it has no effect on content. You can change the display language for the following:

  • Site title and description
  • SharePoint standard menus
  • Standard SharePoint columns
  • Custom columns (list or site)
  • Navigation bar links
  • Managed Metadata services

Figure 23.1 shows a SharePoint site that has been changed from the default language of English to French within the browser. The language picker is also shown. You can of course use the MUI for the user interface and variations for the actual content.

In order to use the MUI you are required to download the specific language packs available for SharePoint. Language packs can be downloaded for both SharePoint Server and SharePoint Foundation. Language packs can be downloaded from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3411. After downloading you must run the language pack executable and then run the SharePoint Products Configuration wizard to complete the process. Once the pack is installed and configured you will find a language setting has been added to the Site Settings category under Site Administration. Language Settings enable you to select the additional languages you require for the site collection. The selected languages are in addition to the default language used when the site was created. For example, if your install language is US English and you add the French Language Pack the end result is the ability to switch between US English, the default language used when installing SharePoint, and French.

Variation Settings

Once you have created a publishing site or publishing portal you will find the variations features located within the Site Collection Administration category of the Site Settings at the top level of your site collection. The settings available are as follows:

  • Variation Home: This is the URL to the core variation site from which content will be copied down into the variation subsite.
  • Automatic Creation: In this section you can choose to publish variations either manually or automatically to the target site or sites.
  • Recreate Deleted Target Page: If a source page is republished and the copy has been deleted this option will let you recreate it. This could happen, for example, if an end user deleted a page in the target site. You can also choose not to recreate deleted content.
  • Update Target Page Web Parts: Specify how to update target Web Parts when the source is updated.
  • Notification: Choose whether or not to be notified by email when a new page is created or updated by the variation system.
  • Resources: Resources used by the source page can be copied into the target site or left in the main site. If left in the main site links to them would be used in the target site content.

Setting Variation Labels

Variation labels are used to identify each language you would like to use within a given variation hierarchy. For each language you would like to use you are required to create a variation label. A specific SharePoint site will then be created for each of the variation labels defined. The options available are:

  • Label name and description: Text describing the label
  • Display Name: The name for the navigation menu. For example, if the secondary site is using German you would create a display name of German.
  • Language: The language that will be used for the user interface for the variation site.
  • Locale: The location determining date, time, and currency data within the site.
  • Hierarchy Creation: Allows you to select what area of the SharePoint site you would like to publish to other sites.
  • Source Variation: This sets up the source variation for your variations and cannot be changed once created.

Setting Translatable Columns

The Translatable Columns option enables you to specify which columns in your site collection will require translation. This is a setting available at the top level of the site collection within the Site Collection Administration category. Once chosen this option you will be able to pick which of the available site collection columns are allowed to be translated into the target language.

Set Variation Logs

Variations are managed and organized by SharePoint timer jobs. Variation logs enable you to view the jobs that have been executed and any associated errors. Again this option is available from the root of the site collection in the Site Collection Administration category. Logs are limited and are read-only on screen. For example, unlike many of the SharePoint system logs they cannot be exported to Excel for analysis. You can view the timer jobs used from Central Administration by clicking the Monitoring link and then selecting Check job status. From the status page you can review all timer jobs on the server including those related to variations.

Try It

In this Try It exercise you are going to configure your SharePoint site for multiple languages, in this case French and English. You will do the following:

  • Enable the MUI for SharePoint 2010
  • Configure variation settings for a multilingual interface
  • Set labels for a second language
  • View sites in browser

Lesson Requirements

To complete this exercise, you need the following:

  • The SharePoint 2010 Server language packs, which can be downloaded from http://www.microsoft.com/. Simply search for the language pack you require. You will also require a site collection with the publishing infrastructure activated.
  • The Step-by-Step section that follows assumes that a language pack has been installed and is fully functioning.

Step-by-Step

From the home page of your site collection you will first enable the MUI, which will allow your users to change the language used by the site menus and other SharePoint features. This will have no effect on the site content. To allow a user to select a language, follow these steps:

1. Click the Site Actions button

2. Click Site Settings

3. Click Language Settings in the Site Administration category.

4. Click the checkbox in the Alternative Language section to choose the alternative language for the site. In my case, because I installed only the French language pack, the only option is French.

5. Click OK to save the changes.

6. Click Home to return to the home page of the site collection

7. Click your username, located at the top right of the screen, to open the context menu.

8. Click Select Display Language.

9. From the resulting submenu select the alternative language (in this case French).

Your page should now refresh in the browser and your SharePoint menus and other system items should be displayed in your chosen language. Refer to Figure 23.1, which shows the effect of the change from the sites default language. To return to the site's default language simply repeat Steps 7 through 9. Remember, the MUI deals only with the interface to SharePoint. If you require content in multiple languages you will have to use variations.

Configuring Variation Settings for a Multilingual Interface

To configure your site for variations, make sure that the publishing infrastructure has been activated for the site collection and that the publishing features have been activated for the individual site. Once the publishing infrastructure has been enabled the following options will become available:

  • Variations
  • Variation labels
  • Translatable columns
  • Variation logs

To continue with the example follow these steps:

1. Click Site Actions.

2. Click Site Settings.

3. Click Variations in the Site Collection Administration category.

4. Type “/” in the Variation Home text box.

Accept the following default settings, which will be set to Available:

  • Automatically create site and page variations
  • Recreate a new target page when the source page is republished
  • Update Web Part changes to target pages when variation source page update is propagated
  • Send email notification to site and page contacts when a new site or page is created or a page is updated by the variation system
  • Reference existing resources

5. Click OK to save the changes.

The next step is to create the variation labels, one for each language you will be using. Here we are using English (default language) and French, and we will create a label for each language. To proceed from your Site Settings page and the Site Collection Administration category, do the following:

1. Click Variation Labels.

2. Click New Label.

3. Enter “English” as the Label Name.

4. Enter “English language site” as the Description.

5. Enter “English” as the Display Name.

6. Select English as the site template language using the Site Template drop-down list.

7. Select English (United States) as the locale using the Locale drop-down list.

8. Accept the default of Publishing Sites and All Pages in the Hierarchy Creation section.

9. Check the box labeled Set This Variation to be the Source Variation.

10. Select Publishing as the site template you would like to use.

11. Click OK to create the first label. We have set this as the source variation, and this setting cannot be changed once you click OK.

12. Repeat this process to create a label for the second language, in this case French. Make the following changes and click OK to create the additional variation label.

  • Label Name: French
  • Display Name: French
  • Site Template Language: French
  • Locale: French (France)

13. Click the Create Hierarchies on the Variation Labels Page link to trigger the creation of your variation timer job. The following message will be displayed: “A variation hierarchy will be created. The timer job ‘Variations Create Hierarchies Job Definition’ will be run based on the following schedule: ‘daily between 00:00:00 and 03:00:00’.”

14. Click OK to complete the process.

At this point in the process you will have to wait until the variation hierarchy is created by the timer job. (You could, of course, ask your SharePoint administrator to run the job for you immediately from SharePoint Central Administration.) Once the timer job has been executed and completed, the status of the hierarchy will be displayed on the Label Management page. Figure 23.2 shows the screen once a successful timer job has completed.

If you return to the home page of your site collection you should see the effect. In my case I have enabled the display of subsites in the site collection navigation (Site Actions, Site Settings, Navigation) to see the effect of the previous series of steps. In this case there are two subsites, English and French. The English site is the source site, from which content is copied into the French site for translation. In the case of the French site we have set the locale to French so that the user interface is already in that language. When you edit or add a page to your English site it will be copied into the French site by a timer job running on the server. Figure 23.3 shows the results when a page is edited within the English site. The same page can be seen in the corresponding French site and all that is required is its translation to the source language.

It is important when working with multiple sites and languages that you have some sort of idea of what has been copied into your target (French) site. Within the French site it is possible to view the edits that have taken place on a given page: Figure 23.4 shows our example page, which has been edited to contain a small amount of French (thanks Grace).

You can see the page history by clicking the Page tab when editing a page and selecting Page History. From the History page you can view all edits that have taken place within the page over specific time periods.

1.10

Please select Lesson 23 on the DVD or visit www.wrox.com/go/sp2010-24 to view the video that accompanies this lesson.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.253.152