Custom redirect Variations in SharePoint 2010

In previous posts I explained how to make variation labels and sites and how to use a custom site definition for the variations.

I took it another step further. The redirect to the variation will not happen based on the browser regional settings but based on the  user regional settings.
This means that the user has to choose his language at the first log in.
image
So I made two visual web parts. One to choose his languages and one to redirect to the correct variation.

Choose language-WebPart

I got the Variation labels-list and placed for each of them a image button.
image

Next I got the Culture Information from the tooltip, filled in the Regional Settings of the user and redirected to the homepage of the web.
image

Redirect-WebPart

I check the regional settings of the user and redirect to choose a language if they are empty.
Get the list with the made variation relations and find the variation with the name of the language.
image

WATCH OUT!!!

The fact that we can reach this list of variation labels and variation relationships is perfect.
Unfortunately when a normal user (with Full Control-permissions) wants to open the page that contains one of these Visual WebParts, his access will be denied.
The variation-lists are only available to the site collection administrator so these WebParts won’t work for other users.

Reacties

Populaire posts