0

I'm currently working on developing public CMS web sites with SharePoint 2010. The site will use two languages on it that will be two separate site collections on the same web application. Two managed paths will be used for this.

The question is what will happen when hitting http://www.somecompany.com/.

There are two options here:

  1. Redirect (permanent?) to the default language, which would be "en"
  2. Check the browser language and redirect to "fr" if matching, or else to default language "en"

How would I set up the redirects? Would there be differences between the two options? Do I have to set up a site collection on http://www.somecompany.com/ as well and redirect or is there another way of doing this since that site collection would be used for anything else?

2 Answers 2

1

If you dont want to set up a site collection at http://www.somecompany.com, You can achieve the redirection using httpmodule. The httpmodule is applied at web application level so it doesn't care if your site collection really exists.

In the httpmodule, You can check for Accept-Language header using the Headers collection in the Request object : Request.Headers["Accept-Language"]

Or

You can use the code like here : http://madskristensen.net/post/Get-language-and-country-from-a-browser-in-ASPNET.aspx

0

Your best bet is to use the built-in SharePoint Server variations functionality. It will take care of all the redirection etc. For more info, start here http://technet.microsoft.com/en-us/library/cc262055.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.