Wednesday, August 19, 2009

How do I get person.aspx to display in different languages?

I spent quite some time looking at person.aspx recently. Person.aspx is the page that displays the user profile when you perform a People search and click on a result. It is also known as the Public My Site page.

I want to implement the Public My Site without enabling personal sites which is controlled through the SSP configuration.

image

What I wanted was the ability to display the user profile in multiple languages. I installed a language pack on my farm (Spanish in my case) and then when I go to the profile property mapping, I get the label definitions for English and Spanish.

The person.aspx page resides in the My Site Host site collection which I had created in a different web application.

The mistake I made was that I expected that person.aspx was going to dynamically display the labels in the alternate language depending on the language setting of the browser.

The real answer is that person.aspx displays the labels in the language of the My Site Host site collection! It is not dynamic as you might expect in asp.Net applications.

In talking to Microsoft and reading other posts, it seemed that you could only use the language of the My Site Host which the SSP only provides for one of.

However, once I realised that it was dependant on the Site Collection language, I created a second My Site Host site collection in Spanish. If I then pass the parameters to the person.aspx in the Spanish site collection, Person.aspx displays the labels in Spanish (as well as the rest of the SharePoint UI).

So now I just have to make sure that the correct person.aspx page is displayed based on the language required by the user.

1 comment:

AnDrE said...

Hello Jeremy.
Nice post. It solve my problem.

Just to left my feedback about this issue:
What i've done was to delete the site collection root of the MySite WebApplication (because i have a diferente WebApplication for MySites, managed by SSP) and create it again in portuguese language with "My Sites Host" template.

I could resolve in this way because my application didn't have any user site created.
I think that this issue could be a nightmare (i think so) to perform this operation and keep all user sites data.

Thanks!