20
SpringPoint Technologies, LLC www.myspringpoint.com 1 SharePoint Publishing Sites with Variations (Multi-Lingual) David McCollough

Share Point Publishing Sites With Variations

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

Page 1: Share Point Publishing Sites With Variations

1SpringPoint Technologies, LLC www.myspringpoint.com

SharePoint Publishing Sites with Variations (Multi-Lingual)

David McCollough

Page 2: Share Point Publishing Sites With Variations

2

Architecture

SpringPoint Technologies, LLC

Page 3: Share Point Publishing Sites With Variations

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.

Page 4: Share Point Publishing Sites With Variations

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.

Page 5: Share Point Publishing Sites With Variations

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).

Page 6: Share Point Publishing Sites With Variations

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.

Page 7: Share Point Publishing Sites With Variations

7SpringPoint Technologies, LLC

Page 8: Share Point Publishing Sites With Variations

8

Implementation

SpringPoint Technologies, LLC

• Once variations are turned on, you can’t turn them off.

Page 9: Share Point Publishing Sites With Variations

9

Implementation

SpringPoint Technologies, LLC

Page 10: Share Point Publishing Sites With Variations

10

Implementation

SpringPoint Technologies, LLC

Page 11: Share Point Publishing Sites With Variations

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.

Page 12: Share Point Publishing Sites With Variations

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.

Page 13: Share Point Publishing Sites With Variations

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.

Page 14: Share Point Publishing Sites With Variations

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.

Page 15: Share Point Publishing Sites With Variations

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 …        }     }

Page 16: Share Point Publishing Sites With Variations

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; }}

Page 17: Share Point Publishing Sites With Variations

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; }}

Page 18: Share Point Publishing Sites With Variations

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.

Page 19: Share Point Publishing Sites With Variations

19SpringPoint Technologies, LLC

Q/A

Page 20: Share Point Publishing Sites With Variations

20

Contact Info

SpringPoint Technologies, LLC

• Email: [email protected]• Blog: http://weblogs.asp.net/DavidMcCollough/

• Company: www.MySpringPoint.com