Copied to clipboard

Flag this post as spam?

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


  • Vladimir Knobel 95 posts 170 karma points
    Jan 25, 2012 @ 04:02
    Vladimir Knobel
    0

    Creating Multilingual / Multisite Installation

    Hi 

    I'm trying to setup Umbraco to support Multiple sites but each site must also support multiple languages, at least two. I was able to make it work as follow:

    The only catch is I don't know how to assign the culture locale to the language node, it's there any property type to help with this? Or should I do a custom solution?

    Best Regards

    Vlax

  • Jeroen Breuer 4860 posts 12121 karma points MVP 3x admin c-trib
    Jan 25, 2012 @ 06:58
    Jeroen Breuer
    0

    You can do this by right clicking on the language node(en or de) and add a hostname. The hostname can be something like "/en" or "/de", but there you can also set the language which will change the culture.

    Jeroen

  • Yarik Goldvarg 35 posts 84 karma points
    Jan 25, 2012 @ 08:07
    Yarik Goldvarg
    0

    And don't forget to change "umbracoHideTopLevelNodeFromPath" value to FALSE in web.config

  • Jeroen Breuer 4860 posts 12121 karma points MVP 3x admin c-trib
    Jan 25, 2012 @ 09:14
    Jeroen Breuer
    0

    Hmm looking at his site structure it's not recommended to set umbracoHideTopLevelNodeFromPath to false. His top level is "corporate website" and that should be hidden. That way the url's will look like this website.com/nl or website.com/de

    Jeroen

  • Yarik Goldvarg 35 posts 84 karma points
    Jan 25, 2012 @ 09:45
    Yarik Goldvarg
    0

    In this case you're right :)

  • Rodion Novoselov 694 posts 859 karma points
    Jan 25, 2012 @ 10:36
    Rodion Novoselov
    0

    I've seen problems with configuration where there're several top-level nodes and umbracoHideTopLevelNodeFromPath=true. First of all URLs are somehow confusing, e.g.:

    en                            ----->    /
        Contacts              ----->    /contacts/
    de                           ------>  /de/ 
        Kontakt                ---->   /kontakt/  (you see - it's not "/de/kontakt/" as it might have been expected)

    A much worse thing happens when there're two pages with the same name under both of the trees - from my experience they will be simply unavailable (404 ugly page) till you unpublish one of them.

    Since that I'd rather avoid such a configuration.

    Back to our case - why not to put both top-level nodes (Corporate and Country) under a single fake Home and to set up redirection from it (e.g. Home -> Corporate)?


     

  • Vladimir Knobel 95 posts 170 karma points
    Jan 25, 2012 @ 18:43
    Vladimir Knobel
    0

    Hi Jeroen 

    Thanks for your answer but I see some problems asociated with that solution. By adding a domain in the language node as you described I get following URL in the children pages:

     

     

    Not exactly what I was hopping for :)

    Is there a workaround for this?

    Thxs and regards

    Vlax

  • Vladimir Knobel 95 posts 170 karma points
    Jan 25, 2012 @ 18:46
    Vladimir Knobel
    0

    Hi Rodion 

    I will explore your solution but I have read that starting a site with a rediction is not very SEO friendly...

    Thxs and Regards

    Vlax

  • Yarik Goldvarg 35 posts 84 karma points
    Jan 25, 2012 @ 18:49
    Yarik Goldvarg
    0

    I think, that you need to change property in umbracoConfig file.

     <useDomainPrefixes>false</useDomainPrefixes> to true

    and recycleapp pool

  • Yarik Goldvarg 35 posts 84 karma points
    Jan 25, 2012 @ 18:51
    Yarik Goldvarg
    0

    Sorry , umbracoSettings.config file :)

     

  • Rodion Novoselov 694 posts 859 karma points
    Jan 25, 2012 @ 19:04
    Rodion Novoselov
    0

    Hi, Vlax. You can use the "umbracoInternalRedirectId" feature so there'll be no redirect the "/" url will simply display for instance your "Corporate" page. By the way it's quite a significant thing - are your "Corporate" and "Country" subsites supposed to be accessed by different domain names? If yes, then initial configuration (two top-level nodes + hide tope level nodes) will be absolutely OK. Some time ago I was experimenting with multiply top-level nodes configurations and I'd rather say that it's suitable only in case you separate these nodes by a domain name - otherwise it goes awfull headache.

  • Vladimir Knobel 95 posts 170 karma points
    Jan 25, 2012 @ 21:25
    Vladimir Knobel
    0

    Hi Yarik 

    I have already useDomainPrefixes set to true.

    Thanks for the tip

    Vlax

  • Vladimir Knobel 95 posts 170 karma points
    Jan 25, 2012 @ 21:38
    Vladimir Knobel
    0

    Hi Rodion 

    Both "Corporate" and "Country" subsites have different domain names, and in fact I have also the "umbracoInternalRedirectId"  in place.

    I think I will set a recursive variable in the language nodes and set the Thread Culture and Locale in an user control on each page...

    Thxs and regards

    Vlax

  • Jeroen Breuer 4860 posts 12121 karma points MVP 3x admin c-trib
    Jan 25, 2012 @ 21:50
    Jeroen Breuer
    0

    Hi Rodion,

    I think you can still set the language with a hostname as I described, but instead of adding /en or /de as a name you should set the domain (without http or www). So could you try this as hostnames:

    website.uk (en example)

    website.de (de example)

    Than if you look at url's the should be fine :).

    Jeroen

  • Rodion Novoselov 694 posts 859 karma points
    Jan 25, 2012 @ 21:55
    Rodion Novoselov
    0

    Hi, Vlax. That's absolutely great. Just yet another question - do you fully control those domains?

  • Rodion Novoselov 694 posts 859 karma points
    Jan 25, 2012 @ 22:16
    Rodion Novoselov
    0

     

    My proposal to Vlax is following.

     

    Hostname settings:

    Corporate Site   
         en                       set:   hostname = en.corporate.com , lang = English
         ru                                hostname = ru.corporate.com , lang = Russian
    Country Site
         en                               hostname = en.country.com , lang = English  
         ru                                hostname = ru.country.com , lang = Russian  

     

    Other settings:

        umbracoHideTopLevelNodeFromPath = true; 
        useDomainPrefixes = true; 

     

    So that what we will have:

    Corporate Site   
         en                       url:    http://en.corporate.com/
         ru                                http://ru.corporate.com/
    Country Site
         en                               http://en.country.com/
         ru                                http://ru.country.com/

     

    No conflicts between diferent parts of the tree and proper current language when visiting every part of the site.

  • Rodion Novoselov 694 posts 859 karma points
    Jan 25, 2012 @ 22:22
    Rodion Novoselov
    0

    And also, in fact you can safely not bother about the value of "useDomainPrefixes" if parts of your site with different domain names don't refer to each other.

  • Vladimir Knobel 95 posts 170 karma points
    Jan 25, 2012 @ 22:51
    Vladimir Knobel
    0

    Hi Rodion 

    Thanks for your proposal, but I don't fully control the domains...

    Regards

    Vlax

  • Vladimir Knobel 95 posts 170 karma points
    Jan 25, 2012 @ 23:31
    Vladimir Knobel
    0

    Hi Jeroen

    That's not an option because I still want to use separate directories structures for the languages...

    But I think you gave me an hint on what can work!

    Regards

    Vlax

  • Vladimir Knobel 95 posts 170 karma points
    Jan 25, 2012 @ 23:50
    Vladimir Knobel
    0

    OK here a config that seems to work.

    I set the hostname to:

    corportatesite.com/en in the (en) language node beneath the corporate node.

    repeated the same for the (de) node

    did a republish site in the content node (very important !!!) and now everything is showing fine!

    Thxs for all the support guys!

    In fact I got the idea from your suggerences and also from following guide:

    http://webmove.be/home/blog/blog/2011/august/multilanguage-websites-with-umbraco-part2

    Regards

    Vlax

     

  • Vladimir Knobel 95 posts 170 karma points
    Jan 26, 2012 @ 00:23
    Vladimir Knobel
    0

    Bad news, I was claiming victory too early:

    Umbraco need the hostnames set in the first nodes beneath the content node, otherwise the nodes in a similar structure in the succesive domains hosted get overcast by the ones in the first domain...

    for example as an hint the second domain in row will show the following as the link to document... 

    So I'm going back to my original idea of setting the locale in a recursive variable...

    Regards

  • Rodion Novoselov 694 posts 859 karma points
    Jan 26, 2012 @ 06:53
    Rodion Novoselov
    0

    Yeah. I had just been going to say that it's impossible to be workable. Umbraco looks up a domain in the database table comparing its name to the server variable SERVER_NAME. So that anything that cannot be a pure host name (like foo.com/en or bar.org/fi) is out of search automatically. Such domain records will be just ignored. I also tried your last configuration and realised that NiceUrl() returned utter gibberish as well.

  • Jeroen Breuer 4860 posts 12121 karma points MVP 3x admin c-trib
    Jan 26, 2012 @ 06:55
    Jeroen Breuer
    0

    Hmm I think I also had this problem. Didn't find a good solution for this. Only thing I changed was to make sure the language node names where unique. So it's like this:

    website1.com/ensite1

    website1.com/desite1

    website2.com/ensite2

    website2.com/desite2

    Not the most pretty solution, but it does work and it's fast and easy to apply.

    Jeroen

  • Jeroen Breuer 4860 posts 12121 karma points MVP 3x admin c-trib
    Feb 15, 2012 @ 13:38
    Jeroen Breuer
    0

    Did you find a solution for you setup? Really interested in what the best solution is.

    Jeroen

  • Vladimir Knobel 95 posts 170 karma points
    Feb 16, 2012 @ 00:24
    Vladimir Knobel
    0

    Hi Jeroen

    Finally I decided to create a locale property in the language node, then I will add a server control or a Razor script that run on each page to set the appropiate locale.

    Didn't tested yet but it should work...

    Regards

    Vlax

  • tentonipete 78 posts 223 karma points
    Feb 16, 2012 @ 10:08
    tentonipete
    0

    I arrived at the same solution. creating a locale property in the language node then changing the executing thread culture on each page.

    http://our.umbraco.org/forum/using/ui-questions/25868-Advice-required-for-best-multilingual-approach

Please Sign in or register to post replies

Write your reply to:

Draft