single site with multiple language version

Hi,

I have a single website in sitecore. I have added new language and content of that language. Now my single content have two versions(en, ar-QA). This website is developed using sitecore SXA. Now I have a dropdown in website to select language. When I select specific language from dropdown, it should show the content in selected language. Please suggest, how can I achieve this.

 

Thanks,

Ravi Sharma

  • Hello Ravi,

    Do you use the language switcher of SXA or have you made a custom component for this.
    The default language selector of SXA will list all the languages that are available for that page and will be shown in the dropdown. When changing to the other language it will change the page to this language.

    Kind regards,
    Danny Paul van Iersel
  • In reply to Danny Paul van Iersel:

    I am new in multilingual site and new in SXA as well. Can you suggest which one will be the best option and how we can implement? As this site is in SXA, so I would like to implement it using SXA. Can you suggest any blog or steps which explains how we can achieve this?

    Regards,
    Ravi Sharma
  • In reply to Ravi Sharma:

    Hello Ravi,

    My experience with SXA is with Sitecore version 9.0.X and SXA version 1.7.
    I'm not sure what version you are using.

    Currently I have found the following very useful to get my project done with SXA. Some of my project use no code at all only the defaults of SXA.
    (a lot is possible)

    An overview of all the different components/renderings can be found at:
    doc.sitecore.com/.../the-sxa-renderings-and-rendering-variants.html

    For more details on how to configure it an use it you can see:
    doc.sitecore.com/.../working-with-content.html

    The language selector is not included but is very basic. You can find it when you add a component under the "Context" tab. You can then use some Css styling to get it to look as you want.
  • In reply to Danny Paul van Iersel:

    I saw this link and followed it to create content in different version. I have published my site and configured it on iis. Now what configuration I need to do to access website in different language from URL as a end user?

    Regards,
    Ravi Sharma
  • In reply to Ravi Sharma:

    Hello Ravi,

    Your site is accessible? and you see your default language as English?

    The Language selector should take care of this.

    You can also test the language, by adding the language code behind your site url like "https://yourdomain.com/ar-QA" it should change the language.
  • In reply to Danny Paul van Iersel:

    Thanks for your reply Danny!

    It's not working in my case. I have done following settings in my application.

    Sitecore.Config:
    <site name="tns" IsSxaSite="true" enableTracking="true" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/QNA/qna" startItem="/Home" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="50MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="25MB" filteredItemsCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" cacheRenderingParameters="true" renderingParametersCacheSize="10MB"/>

    My website is working properly in english with http://localhost:8090. But when I open it with http://localhost:8090/ar-QA, it shows blank page with "Object moved to here." When I click on link it redirecs to other page with following information:

    Most likely causes:

    The resource you are looking for (or one of its dependencies) has been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

    What you can try:

    Go back to the previous page
    Go to the start page


    Additional Information:
    Requested URL: /ar qa
    User Name: extranet\Anonymous
    Site Name: qna

    If the page you are trying to display exists, please check that an appropriate prefix has been added to the IgnoreUrlPrefixes setting in the web.config.

    Regards,
    Ravi Sharma
  • In reply to Ravi Sharma:

    Ont thing that I found is that my Page design and Partial designs are not displaying when I open page with version. But browser is showing title in selected language. Do we need to create version of partial design and page design as well?
  • In reply to Ravi Sharma:

    Hello Ravi,

    No it should not be necessary to have versions on Page designs and Partial designs.

    Do you see anything in the Experience editor when you change the language or does this also give errors?
    Is the language added to /sitecore/system/Languages?

    Kind regards,
    Danny Paul van Iersel
  • In reply to Danny Paul van Iersel:

    You were right that by passing language in url, it's working fine. But without creating partial design version for arabic language, i am not able to see my page.

    Regards,
    Ravi Sharma
  • In reply to Ravi Sharma:

    Hello Ravi,

    I see, do you have content specifics in the Partial designs?
    How did you set up the designs?

    I only use the components on a Partial design for example a Page Content component or Page List component.
    The Page Content has a variant that will take the title or content from that item.

    Kind regards,
    Danny Paul van Iersel
  • In reply to Danny Paul van Iersel:

    Hi Danny,

    I have also done the same before. I have two content. One in us and other is ar-QA. I created a partial design with page list, assigned it to page design and provided datasource. It worked well and started showing content for us language. When I switched url to www.abc.com/ar-qa, it was not showing content. I created arabic version of page design and it started showing component on page. Please let me know if there is any other way!

    Regards,
    Ravi Sharma
  • In reply to Ravi Sharma:

    Thanks Danny! Language Selector worked. But my partial design of single language is not working in other language. I needed to create new partial design for second language.

    Regards,
    Ravi Sharma