Upload
dmccollough
View
1.808
Download
2
Tags:
Embed Size (px)
DESCRIPTION
A "lessons learned" deep dive from recent project experience where Variations were enabled to support the multilingual requirements of an Internet Portal. This presentation discusses configuration, patches, replication issues, performance, custom code, and testing. The majority of the material will be from real world experience and the school of hard knocks!
Citation preview
1SpringPoint Technologies, LLC www.myspringpoint.com
SharePoint Publishing Sites with Variations (Multi-Lingual)
David McCollough
2
Architecture
SpringPoint Technologies, LLC
3
Introduction
SpringPoint Technologies, LLC
Enabling SharePoint Variations on a Publishing Portal allows you to (somewhat) easily create a web application where you can have content pages translated into other languages.
Variations can also be used to provide alternate pages for mobile devices.
4
Planning
SpringPoint Technologies, LLC
• Supporting multiple languages should be considered very early in your design process.
• Variations effects all aspects of a publishing portal including site structure, lists, master pages, page layouts, document libraries, basically everything.
5
Implementation
SpringPoint Technologies, LLC
• A key factor in successfully implementing variations is the patch level of the SharePoint Farm.
• The Minimum level that should be used is 12.0.0.6318. This is MOSS 2007 SP1 plus the infrastructure updates for both WSS 3.0 (KB 951695) and MOSS 2007 (KB 951297).
6
Implementation
SpringPoint Technologies, LLC
• If you have Home as your root site, when you turn on variations it will become /EN/Home
• Any code that you might be using to create lists, page instances, site structure will need to be variation aware.
• Page content is not translated.• Variation labels MUST match the culture codes in
order for page propagation to work.
7SpringPoint Technologies, LLC
8
Implementation
SpringPoint Technologies, LLC
• Once variations are turned on, you can’t turn them off.
9
Implementation
SpringPoint Technologies, LLC
10
Implementation
SpringPoint Technologies, LLC
11
Performance
SpringPoint Technologies, LLC
• Performance, Creating the site hierarchies for the target sites is VERY resource intensive and time consuming. It is recommended that you create only one target site at a time.
• You will experience performance problems using variations in a virtual environment, unless that virtual environment very closely mimics physical hardware.
• Depending on site size, page propagation times will vary.
12
Lessons Learned
SpringPoint Technologies, LLC
• Hidden pages in a pages gallery will be propagated to the target web sites, but they will not be hidden in the target web sites.
• Document libraries are not propagated to the target web sites.
• If you have a page hidden in the current navigation it will not be hidden in the target web sites.
13
Lessons Learned
SpringPoint Technologies, LLC
• Changing the default welcome page requires you to reset it on the target sites.• Source variation lists are not
propagated to target sites.• Only page galleries will be propagated
and the pages will be in draft mode.
14
Lessons Learned
SpringPoint Technologies, LLC
• Using a custom master page on the source site requires you to reset the master page on the target sites.• Images in the source variation are not
propagated to the target sites.• Content Types must match between page
gallery’s in both the source and target sites.
15
Sample Code
SpringPoint Technologies, LLC
Retrieve all variation labels and iterate over
// Grab all of the variations. ReadOnlyCollection<VariationLabel> variationLabels =
Variations.Current.UserAccessibleLabels;
foreach (VariationLabel vl in variationLabels) { using (SPWeb webSite = siteCollection.OpenWeb("/" + vl.Title
+ "/AboutUs")) {
// List Creation code omitted … } }
16
Sample Code
SpringPoint Technologies, LLC
Retrieve the source (default) variationReadOnlyCollection<VariationLabel> variationLabels =
Variations.Current.UserAccessibleLabels;
foreach (VariationLabel vl in variationLabels){ if (vl.IsSource) { return vl; }}
17
Sample Code
SpringPoint Technologies, LLC
Retrieve relative url for current variation
string currentUrl = SPContext.Current.Web.Url;
ReadOnlyCollection<VariationLabel> variationLabels = Variations.Current.UserAccessibleLabels;
foreach (VariationLabel vl in variationLabels){ if (currentUrl.StartsWith(vl.TopWebUrl,
StringComparison.CurrentCultureIgnoreCase)) { variationUrl = "/" + vl.Title;
break; }}
18
Utilities
SpringPoint Technologies, LLC
• If you find that variations just isn’t working as you would expect there is a possibility that the relationships list has become corrupt.• Tim Dobrinski has created a variations
editor utility to help fix the relationships list. You can download it from this url: http://tinyurl.com/dbclsp.
19SpringPoint Technologies, LLC
Q/A
20
Contact Info
SpringPoint Technologies, LLC
• Email: [email protected]• Blog: http://weblogs.asp.net/DavidMcCollough/
• Company: www.MySpringPoint.com