MUI capabilities of SharePoint 2010

For some time now, I’ve wanted to explore the MUI capabilities provided in SharePoint 2010. In general they seem to work out fine, but there are some quirks I find a bit strange.

The first step on the path to multi-lingual SharePoint nirvana is to download the appropriate language pack. This has to be installed on each server.

Once that has been installed, you will have to make a conscious choice to enable the language on your site collection; it doesn’t happen automatically.

This can be done quite easily through the site settings.

Then check off the languages you wish to use.

When this has been enabled, you get a new option on the drop-down menu connected to your login name.

It’s then easy to toggle between the different languages.

When provisioning sites and site collections, you get to choose what the default language should be. This works in both the HTML and Silverlight version. The Silverligth version will also be presented in your chosen language.


Another capability of enabling multiple languages is that you can provide a language specific name for your lists. When you edit the title and description for a list, the current culture is stored together with the value. By changing the the active language, it’s possible to add multiple linguistic versions.

The place where things become a bit strange, is on the the quick launch.

Shared Documents shows a modified version for the English version, but on the Norwegian version it seems to be using a translated version of the original.

For my custom list, it doesn’t seem to be using the Norwegian version at all.

CAML is still the King over SPLinq

SharePoint 2007 was based on .NET 2.0, so when SharePoint 2010 came about, they just had to use some of the new developer goodness they had previously missed out on. Linq is incredibly cool, so they just had to implement a Linq provider for SharePoint. On the surface, it looks great. Who doesn’t like Intellisense? Who really likes to mess about with CAML?

They just forgot one thing; a fundamental fact in SharePoint is that the world our code operates in changes at the blink of an eye. This is a problem that Linq to SQL doesn’t face since the database schema doesn’t suddenly change.

If we take a look at a sample of the file generated by SPMetal.exe:

Can you spot the problem? I have several issues with this code.

Firstly, it’s using the display name to find the list. If a user happens to rename your list, you end up with this:

Secondly, it’s a specific language version being used. If you have to support multiple languages, you have a challenge.

If you don’t care two figs about multiple language, the first issue could have been solved by using the URL instead. Once created, that at least doesn’t change.

Ideally, the DataContext implementation should have some functionality to retrieve the localized strings from the site. One common scenario is to create a number of sites of a specific type where each site may be in a different language. If we could used the same DataContext agains all these sites, that would be helpful.

For the time being, I’ll stick with CAML. It may be nasty, but at least I can create code that adapts to the environment I’m running in.

CAML has left the building.

Site customization options

SharePoint has many ways of defining how the site will be configured once created; Site definitions, web templates, feature stapling. For a full list of the options, check out the following blog posts:

Site Definitions vs. Web Templates

SharePoint 2010 and web templates 

I’d like to complement this information with a bit of my own.

In the new webTemplate element, it’s possible to use resource expressions for title, description and display category. This should make it easier to create localized versions of the templates; no need to use parallel file structures.

Feature stapling is something I only do for MySite. At some point in time you may wonder if a problem exists in the standard templates. If you avoid feature stapling, it’s easy to check if the problem exists and thus report a bug.

Don’t be afraid of creating your own templates, with the new webTemplate option, it doesn’t require much effort. The upside is that you then have the ability to grow as time goes by. If you need a department and project template, go ahead. You don’t have to try and tweak both options into feature stapling against the generic team site.

The Wheel of Time

13 Books

11000+ pages

3,5 months

I’ve had things to keep me occupied.