Copied to clipboard

Flag this post as spam?

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


  • Ove Andersen 435 posts 1541 karma points c-trib
    Jul 20, 2011 @ 12:57
    Ove Andersen
    0

    Multilingual site using "folders" instead of subdomains

    How can I achieve url's like this in a multilingual site:

    www.panoramahotell.no/home (main version)
    www.panoramahotell.no/en/home (english version)

    My site structure is like this:

    The hostname for the english site is like this:
    (The norwegian/main one is the same, just with without "/en")

    Umbraco is set up with domain prefixes and stuff, and it seems the english home page has the correct url:

    When I try to browse to that url however, I get a 404 error.

    Have anyone successfully implemented this kind of multilingual setup?

     

  • Stephen 767 posts 2273 karma points c-trib
    Jul 20, 2011 @ 13:04
    Stephen
    0

    We have that very same setup on that site for example -- so it is possible.

    Hostnames are set to www.example.com/en and www.example.com/fr. Having a hostname set to www.example.com may be the cause of the issue, because Umbraco will get that one and then look for a /en page into it -- which does not exist. So you may want to try to set the hostname of the NO version to www.panoramahotell.no/no.

    Then, you'll need some sort of handler to redirect visitors from www.example.com to either /en or /no based upon... whatever you want... we do it with some ip-based geolocalisation + browser language...

  • Ove Andersen 435 posts 1541 karma points c-trib
    Jul 20, 2011 @ 13:11
    Ove Andersen
    0

    Yes, that should work. I was however looking for a less "crude" implementation.

    Will implement this if no other solution arises though :-)

  • Stephen 767 posts 2273 karma points c-trib
    Jul 20, 2011 @ 13:16
    Stephen
    0

    Alternatively, do leave the hostname to www.example.com/no + add a rewrite rule to add /no to urls that do not start with /en + add a tweak to Umbraco to remove /no from urls when generating them. We have that in production too. Not sure if the "tweak" is possible on the public Umbraco versions, though. I can dig for it if you're interested.

    The end result should be what you're looking for.

  • Ove Andersen 435 posts 1541 karma points c-trib
    Jul 20, 2011 @ 13:37
    Ove Andersen
    0

    If anyones interested, here are the hostnames for the main (norwegian) node:

  • Stephen 767 posts 2273 karma points c-trib
    Jul 20, 2011 @ 14:29
    Stephen
    0

    Interesting... are you saying this is enough to get your setup to work? Ie set both with and without /no on the main node? Would both /no/selskap and /selskap urls work, then?

  • Ove Andersen 435 posts 1541 karma points c-trib
    Jul 21, 2011 @ 11:19
    Ove Andersen
    0

    No. The setup I have displayed above does not work.

  • Stephen 767 posts 2273 karma points c-trib
    Jul 21, 2011 @ 19:17
    Stephen
    0

    Unfortunately the setup I described above relies on a patch to Umbraco's core, that we haven't commited yet. I have not idea if it will make it into 4.7.1. Which brings you back to the other, "crude", solution.

  • Gilles Faessler 29 posts 53 karma points
    Aug 11, 2011 @ 13:00
    Gilles Faessler
    0

    We would be very intested too to use such structure with folders instead of subdomains. Any news regarding commit of this patch to the core. What would be the crude solution to achieve this ?

    Thanks

    Gilles

Please Sign in or register to post replies

Write your reply to:

Draft