3

We have implemented multisite & multilingual Sitecore implementation and now we are going to implement new website which will support 3 language and 10 country. Code base( VS solution) & Sitecore instance is common for all these sites.

Existing sites

rootPath="/sitecore/content/mycompany/Sites/USSite" startItem="/Home" --> This support only one language en

URL: http://www.myussite.com/en

rootPath="/sitecore/content/mycompany/Sites/CASite" startItem="/Home" --> This support two language en and fr-CA for this we have added fr-CA in system language.

URL: http://www.mycasite.com/en and http://www.mycasite.com/fr-CA

rootPath="/sitecore/content/mycompany/Sites/NewSite" startItem="/Home" --> This will support 3 language (english,spanish and portuguese) and for 10 country.

For this website, domain name remain same for all country. For country and language selection I will provide drop-down. I will add all required language entry in sitecore/system/language node i.e. language and country/region code

User will select country (Brazil) and language(Portuguese) then will be redirected to http://www.mysite.com/pt-BR URL and so on for all language-country combination. For example following will be URL and accordingly we will have content item for each language-country combination

http://www.mysite.com/es-PE

http://www.mysite.com/es-CR

http://www.mysite.com/pt-BR

http://www.mysite.com/es-DO

and so on for all other combination

Is this correct approach? Just want to know that after user selection for country/region code and language how should we redirect user to combined URL

Thanks

UPDATE

Basically right now we have 13 websites which is distinguished by domain name for exp. mysite.co.cr, mysite.com.ar, mysite.com.br and so on and 3 language en(English), es(Spanish) and pt(portuguese).

Region wise language list is /es-cr, /es-ar, /pt-br, /es-cl, /es-co, /es-do, /es-sv, /es-gt, /es-mx, /es-pa, /es-pe, /es-pr, /es-uy

We are planning to migrate all this to Sitecore. There will be one domain mysite.com only which show default en content. For different country/region redirection will be something like mysite.com/pt-BR

Some content pages, social, newsroom etc. will be live only in specified country not in all

All es language content (for exp. articles) remain same across the es specific country but banner/ carousal may be different region/country wise

Our existing structure is already mentioned above. So for this new site how should we organize content set up planning.

Do we need to add 10 language version for each page then only we will be able fetch relevant content as per URL like

for pt-BR region it will be mysite.com/pt-BR

for es-CR region it will be mysite.com/es-CR

for es-ar region it will be mysite.com/es-ar

and so on ( please correct me if I'm wrong here )

please provide any suggestion

  • In brief, you will have the same domain but with different rootPath for each site? – Hishaam Namooya Jan 26 '17 at 9:38
5

You can have two ways of doing it.

First way

If you will have the same domain but different rootPath, you will need to make use of the virtualFolder and physicalFolder attribute in the sitedefinition.config.

The virtualFolder and physicalFolder will allow you to use the same domain but having different sites that hits different rootPath. This will allow you to have less coding.

Site Definition Example:

enter image description here

Once the Site Definition is setup, patch the Sitecore setting AlwaysStripLanguage to set the value to false as shown below:

From

<setting name=”Languages.AlwaysStripLanguage” value=”true”/>

To

<setting name=”Languages.AlwaysStripLanguage” value=”false”/>

You may check my blog post how to setup it here: https://hishaamn.wordpress.com/2016/12/22/sitecore-multi-sites-with-same-domain-but-different-sitecore-item-node/

Second way

You can have a single site node on your content tree. Let's say the path is sitecore/content/sites/Europe sites. Then you can add different language versions in order to create a multilingual sites. In other words, the Europe sites item will have different language versions along with its subitems.

The main advantage here is that you will have to manage a single node. However, if you are using Sitecore 7.2 or below, you will not be able to customize the presentation details per language as these Sitecore versions do not have the feature of shared and final layout. Also, it may be difficult to manage 10 language versions on items.

In terms of performance, if I am not mistaken, it is not recommended that an item stores many versions. Furthermore, indexing will take more time to rebuild.

Both approaches are good but it depends on how you want to structure your content tree. Also, in terms of security and access level, you need to take note who are going to work on the content tree. Will it be a single team managing all the different language versions or scattered among different teams?

UPDATE

You can have a single item node as shown below:

 /sitecore/content/mycompany/Sites/NewSite

Then you only add the language version you want. That is, you want to add 10, 8 or 5 language versions based on your requirement. Then you need to setup your SiteDefinition as follows:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> 
<sitecore>
<sites>
    <site name="mysite1" patch:before="site[@name='website']"
        virtualFolder="/"
        physicalFolder="/"
        rootPath="/sitecore/content/mycompany/Sites/NewSite"
        startItem="/home"
        database="web"
        domain="extranet"
        allowDebug="true"
        cacheHtml="true"
        htmlCacheSize="50MB"
        enablePreview="true"
        enableWebEdit="true"
        enableDebugger="true"
        language="es-CR"
        disableClientData="false"/>

    <site name="mysite2" patch:before="site[@name='website']"
        virtualFolder="/"
        physicalFolder="/"
        rootPath="/sitecore/content/mycompany/Sites/NewSite"
        startItem="/home"
        database="web"
        domain="extranet"
        allowDebug="true"
        cacheHtml="true"
        htmlCacheSize="50MB"
        enablePreview="true"
        enableWebEdit="true"
        enableDebugger="true"
        language="es-PE"
        disableClientData="false"/>

    <site name="mysite3" patch:before="site[@name='website']"
        virtualFolder="/"
        physicalFolder="/"
        rootPath="/sitecore/content/mycompany/Sites/NewSite"
        startItem="/home"
        database="web"
        domain="extranet"
        allowDebug="true"
        cacheHtml="true"
        htmlCacheSize="50MB"
        enablePreview="true"
        enableWebEdit="true"
        enableDebugger="true"
        language="pt-BR"
        disableClientData="false"/>

    <site name="mysite4" patch:before="site[@name='website']"
        virtualFolder="/"
        physicalFolder="/"
        rootPath="/sitecore/content/mycompany/Sites/NewSite"
        startItem="/home"
        database="web"
        domain="extranet"
        allowDebug="true"
        cacheHtml="true"
        htmlCacheSize="50MB"
        enablePreview="true"
        enableWebEdit="true"
        enableDebugger="true"
        language="es-AR"
        disableClientData="false"/>
</sites>
</sitecore>
</configuration>

As you see the root path and start item may be the same but it is the language which is important here. If you specify in your URL the language, it will load the site with the proper language version.

If the url is www.mysite.com/pt-BR, it will load the website with the Portuguese Brazil language.

You can make use of the following Sitecore Module to perform the localization much quicker: Smart Tools - Add Version and Copy Content

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.