Copied to clipboard

Flag this post as spam?

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


  • Serhii 2 posts 72 karma points
    Sep 12, 2019 @ 13:15
    Serhii
    0

    Content language according to local

    I have versions of my pages content for a few languages with their own domains I've set in umbraco. But in umbraco, I choose a default one, and it doesn't change according to what language user has as his local. Can I somehow change that behavior so there will be redirects to certain language versions when possible?

  • Shaishav Karnani from digitallymedia.com 354 posts 1638 karma points
    Sep 12, 2019 @ 18:21
    Shaishav Karnani from digitallymedia.com
    0

    Hi,

    Umbraco don't have anything automatic for this requirement. So, you can add your code instead.

    You can do it using Request.Headers["Accept-Language"]. This will give you browser language and you can redirect based on it.

    Cheers,

    Shaishav

  • Serhii 2 posts 72 karma points
    Sep 16, 2019 @ 08:02
    Serhii
    0

    Okay, thanks for the advice, seems like a good way to do it. I'd like to ask for one more, though. Language-specific content comes to my controller actions via RenderModel parameter. So, at that time, content was already requested from database and put into model. I struggle to find the moment where the request is first-proccesed to determine what content to request and where RenderModel is created.

Please Sign in or register to post replies

Write your reply to:

Draft