Copied to clipboard

Flag this post as spam?

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


  • Graham 21 posts 51 karma points
    Nov 01, 2010 @ 19:27
    Graham
    0

    Multi country / multi language website - best practice advice?

    I need to create a site which can be used and maintained in different regions / countries, and each region/country will have different content in multiple languages.

    Not only that, but I want the URLs to be readable in each language (don't want much do I?).

    For example, for French content on the Swiss site, I want

    www.mywebsite.com/CH/FR/accueil.aspx

    For English content on the Swiss site (yes I know Englkish is not an official language, but they want it anyway)

    www.mywebsite.com/CH/EN/home.aspx

    The same user should be able to log in and change the entire site structure for Switzerland (i.e. anything under mywebsite.com/CH) and also change the different language versions of each page. The pages within a region need to be linked so that if a user on the Swiss site changes language, they are taken to the same page in the selected language.

    Note also in the examples above, they should be able to set the URL - so for the French version of the home page we have Accueil.aspx, for the English version we have Home.aspx. This is to make the site more user frienfdly, and also to improve SEO.

    Then there will be other regions which have different sets of languages. A Super User can log in and set up anything they like, but country / region administrators should only change content for their region.

    Note that the site structure for all regions is expected to be the same on day 1, but the regional administrators will need the ability to add sections and pages to their sites that will not be available in other countries / regions.

    I have some ideas on how this could be done, none of which are very nice, but I would welcome any input anyone has on how best to do this.

    Note I am an experienced ASP.NET developer, but have no experience of Umbraco or any other CMS.

    Thanks in advance.

    Graham

     

  • Yannick Smits 321 posts 718 karma points
    Nov 01, 2010 @ 19:45
    Yannick Smits
    0

    From your requirements I would recommend first building the site in 1 language and than take this version as a base starting point for all other regions and languages. Every region should then be configured as a copy of the 1st language (you can have multiple nodes under the root node in the umbraco admin). Each copy can have it's own culture assosiated with it. If like you wrote within a region you want "linked" pages between the region-languages you can again create a copy of the 1st region site and enable "Relate copied items to original". This will allow you to create a language picker that knows which language site is related to that page.

  • Graham 21 posts 51 karma points
    Nov 01, 2010 @ 19:57
    Graham
    0

    Thanks Yannick.

    That makes a lot of sense, but there is one aspect I'm not so sure about.

    Lets say the Swiss manager goes in and adds a new section to the Swiss site "News", and adds a load of pages. He would then presumably have to rerpeat the entire process (i.e. recreate the structure and page layouts) in the Swiss French, Swiss German, Swiss Italian etc. and presumably these pages would not be "linked" for when the user of the site decided he wants to read the news in a different language. Or am I missing something?

    I'm not too familiar with Umbraco, but I guess if he can copy / paste from one language node to another, and enable "Relate copied items to original", it might still work?

  • Yannick Smits 321 posts 718 karma points
    Nov 01, 2010 @ 20:06
    Yannick Smits
    0

    Best would to also create a base region site which has the base structure (the one you create the copies of) and add hook into the document's afterpublish event to create a copy in the related language sites.

    A great sample and instructions on this multi-lingual approach can be found on umbraco.tv:
    http://umbraco.org/help-and-support/video-tutorials/for-developers/events/sync-2-websites-with-events-and-the-relationship-api

    and here is a link to the sample code project:
    http://video.umbraco.org/developer/events/samples.zip

     

  • Graham 21 posts 51 karma points
    Nov 01, 2010 @ 20:49
    Graham
    0

    I can't get access to the vid you posted without a subscription, but from the 2 minute "taster" it does seem to be the right solution.
    Can you point me at any other help on using events to create a copy of new pages in the copied folder?
    Also, when I copy the folder, how do I set it up with the language, and how do I tell it the URL structure? I thought this would be possible in "manage hostnames" but while I can set the language, I cannot set a subfolder for my site structure. If I do nothing, both the copy and original navigate to the same URL.

  • Yannick Smits 321 posts 718 karma points
    Nov 02, 2010 @ 11:44
    Yannick Smits
    0

    Dit you have a look at the sample code? It contains an example of the new page to related folder feature.

    Language can be set on a node by using manage hostnames as you say. URL structure is based on the foldernames and the document name. So you can change the foldernames to match your language/region and change the document name to hold your translated page name in the url.

  • Graham 21 posts 51 karma points
    Nov 02, 2010 @ 11:49
    Graham
    0

    You're a star Yannick.

    I had a brief look at the code last night but I will have another look today.

    Thanks for all your help.

    P.S. I would "High five" your other responses but I don't have enough Karma apparently! :(

  • Graham 21 posts 51 karma points
    Nov 02, 2010 @ 14:39
    Graham
    0

    OK I've got a bit of an issue.

    I created a new pages called "English" in "UmbracoTestSite". The URL is UmbracoTestSite/English.aspx

    I created a new page under English called "Home". The URL is UmbracoTestSite/Home.aspx

    When I copy these documents and rename English to French, and Home to Accueil, I get similar URLs, i.e. UmbracoTestSite/French.aspx and UmbracoTestSite/Accueil.aspx

    However, what I need is for the URL to include the "folder" name i.e. the parent item in the tree, so I want it to have UmbracoTestSite/English/Home.aspx and UmbracoTestSite/French/Accueil.aspx

    Without this functionality, I will not be able to arrnage my countries and languages as I will need to.

    Is this possible?

  • Yannick Smits 321 posts 718 karma points
    Nov 02, 2010 @ 14:59
    Yannick Smits
    0

    Have a look at the tree in this post. This means that if you create the "folders"English" and "French" they will be added in your URL.

  • Graham 21 posts 51 karma points
    Nov 02, 2010 @ 15:10
    Graham
    0

    Yeah that's what I want ... but how do I create a document type of folder? It seems all document types relate to master pages (templates) and I just want a folder to structure the URL.... the example in the link looks like this is what it is doing, but is difficult to tell.

  • Yannick Smits 321 posts 718 karma points
    Nov 02, 2010 @ 15:13
    Yannick Smits
    0

    You can create a new document type, change it's icon to look like a folder or "home" and use that (with any template) to create the structure. Then on the node itself you set the "umbracoRedirect" property to show the first child node.

  • Graham 21 posts 51 karma points
    Nov 02, 2010 @ 15:29
    Graham
    0

    I don't understand how that will help.

    I've had a look at the umbracoRedirect property and it is for redirecting (as the name suggests). If I select the page I want, it is just redirecting back to itself without the folder structure I need.

    I also looked at umbracoUrlName but this is just to change the page name, not add the folder structure I need.

    Am I missing the point, or is there another way to achieve this?

  • Yannick Smits 321 posts 718 karma points
    Nov 02, 2010 @ 15:32
    Yannick Smits
    0

    The point is that you need to create the tree hierarchie the same as your URL hierarchy. So if instead of /English.aspx you want /English/Home.aspx you need a structure like this:
    -English
    --Home
    -French
    --Acceuil

    Where Home is a child of the English node and the English node is umbracoRedirecting to Home just to prevent users from accessing English.aspx.

  • Graham 21 posts 51 karma points
    Nov 02, 2010 @ 15:51
    Graham
    0

    That's exactly what I'm doing!

    Home is a child of English in the tree, but the URL is site/home.aspx, not site/English/home.aspx

    Accueil is a child of French in the tree, but the URL is site/accueil.aspx, not site/French/accueil.aspx

     

    However, I've just been playing around and it seems this may have something to do with the depth of the folder. As a test, I created pages that were nested, l1, l2, l3 & l4. Their URLs are site/l1, site/l2, site/l2/l3, site/l2/l3/l4

    In other words, the l1 structure seems to be ignored in the URL, but subsequent levels are included in the URL. No need for umbracoRedirect, just an additional level in the tree. I may be wrong - it may have more to do with the document types, but at first look it does seem to be based purely on the depth.

    So I guess my solution is to create a folder under Content called "Sites" (euivalent to l1), then under that have a folder per country (l2) and then per language (l3) to get my desired structure.

    So in my tree I will have Content>Sites>Swiss>French and for my URL I have site.com/Swiss/French/etc.

    Please let me know if that is not correct, or if there is a better way of doing this.

     

  • Yannick Smits 321 posts 718 karma points
    Nov 02, 2010 @ 15:53
    Yannick Smits
    0

    Try setting umbracoHideTopLevelNodeFromPath to false in your web.config.

  • Graham 21 posts 51 karma points
    Nov 02, 2010 @ 15:56
    Graham
    0

    Thanks Yannick - I'm quite happy with the extra item in the tree so I probably won't make the change - but it is very interesting to know that this can be taken out if needed, and it explains this otherwise unexplained behaviour.

  • Yannick Smits 321 posts 718 karma points
    Nov 02, 2010 @ 15:57
    Yannick Smits
    0

    From a SEO perspective I would also not recommend to use the region/language names in your URL. You would be better of using your more important (localized) keywords there or make the indicators shorter (ch-fr)

  • Tony Kiernan 278 posts 341 karma points
    Apr 26, 2012 @ 17:45
    Tony Kiernan
    0

    I've had this bookmarked for ages and finally got a chance to implement it.  Fantastic stuff.  Now, to work out how to email the translator when a new node is created...

Please Sign in or register to post replies

Write your reply to:

Draft