Site variations are designed for organizations that
support users who speak a number of different languages, and expect to
see sites in the language they use on their computer. More specifically,
once site variations are defined, users will be redirected based on the
language their browser is set to, assuming a site is defined and the
prerequisites are configured.
SharePoint 2010, unfortunately,
does not do any translation, so the organization will be responsible for
performing the translations of the content. The Translatable Columns
link from
the Site Settings page provides access to the full list of columns used
in the site collection, and allows the site administrator to select
columns that are “translatable” and will be flagged as requiring
translation.
Note also that variations can be
used only on sites that are created with one of the Publishing site
templates, or on sites for where the SharePoint Server Publishing
Infrastructure feature has been enabled. Also, it is important to point
out that by default, the variations feature copies only publishing pages
from the Pages library of the source variation site and does not copy
content from lists or document libraries.
To test variations, follow these steps:
1. | Create
a site that will serve as the variations root site that uses the
Publishing Site template. In this example, a site was created and titled
Variation1 under the root (full URL is http://abcsp1002/variation1).
The hierarchy will be created under this site once the “labels” are
defined and the Create Hierarchies process has completed.
| 2. | From
the Site Settings page for the site collection that contains the site
just created (http://abcsp1002 in this case), click the Variations link
in the Site Collection Administration section.
| 3. | From the Variation Settings page, enter the name of the site created (in this example, /variation1)
in the Variation Home field. Leave the other settings at their
defaults, which in this example are the following: 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, and Reference Existing Resources. Click
OK.
| 4. | Next click the Variation Labels link from the Site Settings page, and click New Label on the toolbar.
| 5. | Enter English as the Label Name, and enter English as the Display Name. From the Locale drop-down menu, select English (United States).
| 6. | In
the Source Variation section, click the box next to Set This Variation
to Be the Source Variation. A warning will appear that states “After you
click ‘Create Hierarchies’ on the Variations Labels page, you will be
unable to change the source variation on this label.” Click OK.
| 7. | Select the Publishing Site template from the drop-down menu in the same section. The page should look the same as Figure 1. Click OK.
| 8. | From the Variations Label page, click New Label on the toolbar, and this time enter Francais as the Label Name, and enter Francais as the Display Name. From the Locale drop-down menu, select French (France).
| 9. | Leave the box next to Set This Variation to Be the Source Variation unchecked and click OK.
| 10. | From the Variation Labels page, click the Create Hierarchies icon.
| 11. | A
message will be provided that indicates “A Variation Hierarchy will be
created” and provides the name of the job (Variations Create Hierarchies
Job Definition, in this example) and the time the job will run (daily
between 00:00:00 and 03:00:00). Click OK to close this message. Figure 2 shows the Variations Labels page after the job has been scheduled.
| 12. | Wait
for the Variations Create Hierarchies Job Definition to complete, if
you are patient; alternatively, visit the Central Administration site if
you are less patient and want
the job to execute immediately. From the Central Administration home
page, click Monitoring, and then click Review Job Definitions and find
the Variations Create Hierarchies Job Definition and click the link.
Click Run Now from that page and the job will run.
| 13. | When the Variation Labels page marks the Hierarchy Is Create with Yes, the variation sites have been created.
| 14. | Visit
the top-level site that was created to host these sites
(http://abcsp1002/variation1 in this example) and check the View All
Site Content page to verify that the sites were created. There should be
two sites created: one titled English and one titled Francais.
|
To test that the variations are working, change IE’s settings as follows:
1. | Open IE (assume version 7 or 8), access the Tools menu, and click Internet Options.
| 2. | Click
the Languages button, and then click the Add button, and find French
(France) and click OK. Then choose French (France) from the Language
preference and click Move Up to place it as the preferred language.
Click OK twice to close the windows.
| 3. | Close
all browser sessions, and open a new session and enter the URL for the
top-level containing site (http://abcsp1002/variation1) and press Enter.
You should end up at the Francais page, which will be a blank page at
this point.
| 4. | Reset
the browser language to English as the preferred language, and you
should end up on the English page, proving the redirect is working.
|
Next modify the blank page on the English version of the page by following these steps:
1. | Visit the English page (http://abcsp1002/variation1/English/Pages/Default.aspx) and click Site Actions, Edit page, and add some content to the page.
| 2. | To
add an image, click the Click Here to Insert a Picture from SharePoint
in the Page Image field, and then click the Browse button and locate an
image stored in a SharePoint library. Click OK once the image is
selected, and it should appear in the Page Image field.
| 3. | Size
the image by clicking the Design tab on the Ribbon and change the
horizontal size which should also change the vertical size if the Lock
Aspect Ratio box is checked.
| 4. | Enter some text in the Page Content field. Figure 3 shows a sample.
| 5. | Click Publish from the Publish tab, enter comments if desired, and click Continue.
| 6. | The
variations process will now replicate these changes to the Francais
page once the Variations Propagate Page Job Definition job runs. By
default, this is set to run hourly, so you can wait for it to run, or
visit the Job Definitions page on Central Administration. To do so,
click Monitoring from the Central Administration home page, click Review
Job Definitions, find the Variations Propagate Page Job Definition job,
and then click Run Now.
| 7. | After this job completes, the Francais site will reflect the changes made on the English site, as shown in Figure 4.
|
Note
An organization can
modify the code of the Variations Root Landing Logic to look at
something other than the language setting of the users’ browsers. MSDN
provides an overview of the process at http://msdn.microsoft.com/en-us/library/ms562040(office.14).aspx.
In short, the VariationsRootLanding.ascx and one user control that is
defined in the VariationsRootLanding.ascx file define the behavior and
can be modified. For example, you might have target variation sites with
pages designed for display on devices that have different screen sizes
or screen resolutions, which could be useful for supporting smartphones
and similar devices.
|