Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fuji Kusaka 2203 posts 4220 karma points
    Dec 02, 2011 @ 11:18
    Fuji Kusaka
    0

    Browser Language Detection

    Hi All,

    Is there a way in umbraco to make a Multilingual Website be redirected to its culture on browser language detection??

    That is if my browser Langugage is set to English it will be directed to www.domain.com/en  and if french be redirected to www.domain.com/fr ??

    Any suggestion on this please?

    //fuji

  • Duncan McDougall 35 posts 62 karma points
    Dec 02, 2011 @ 12:02
    Duncan McDougall
    1

    HttpContext.Current.Request.UserLanguages; will give you an array of accepting languages from the browser.

    From Immediate window

    HttpContext.Current.Request.UserLanguages
    {string[3]}
        [0]: "en-GB"
        [1]: "en;q=0.8"
        [2]: "en-US;q=0.6"

    I suppose this could be integrated into a control that sits on the homepage to perform the redirect. I'd love to here of better suggestions though.

Please Sign in or register to post replies

Write your reply to:

Draft