Copied to clipboard

Flag this post as spam?

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


  • Steen Tøttrup 191 posts 291 karma points c-trib
    Apr 11, 2010 @ 09:13
    Steen Tøttrup
    0

    Umbraco site in multiple languages

    I'm building a site in 8 (at the moment) languages, and I'm using Umbraco. I don't want to use the domain to decide which language should be used, so I've made a structure where the main site is in English, and then I have a folder/page for each of the other languages. Below this folder/page the structure of the English site is copied.

     

    Main Site

       Page1

       Page2

       Italian

        Page1

        Page2

     

    But... how do I get to control which region the different pages are shown with?

    I've made a httpmodule that set the proper region (if the url contains /it/ it's Italian etc), but that of course get overridden later in the request by some Umbraco code. There doesn't seem to be any events for this, so is there ANY WAY of doing this without Umbraco changing it later in the request?

    Any ideas are welcome!

    Thanks in advance,

    Steen

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Apr 11, 2010 @ 10:20
    Dirk De Grave
    0

    Hi Steen,

     

    I'd go for an alternative solution for the content tree, making the http module obsolete

    -Content
    --En
    ---Page1
    ---Page2
    --It
    ---Page1
    ---Page2

    Don't forget to set 

    <add key="umbracoHideTopLevelNodeFromPath" value="false" />

    in web.config which ensures that /en or /it will be part of the url

     

    Hope this helps.

    Regards,

    /Dirk

     

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Apr 11, 2010 @ 11:11
    Steen Tøttrup
    0

    Would that solved the issue with getting the proper region/cultureinfo ??

    I'm not sure how this should be implemented though. Apart from the site in 8 languages, I have several other sites in the same Umbraco solution (to share members), but what you suggest would probably ruin that?

    With your solution to the problem, how would you trigger each language ? If not with domains/host headers, then what ?

     

    Thanks for taking your time to help me,

    Steen

     

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Apr 12, 2010 @ 14:22
    Steen Tøttrup
    0

    Well, I sorted this out by adding a control to the master template. On Page_Load I figure out the region based on the url, and that's that.

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies