+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Localization with DomainExtension does not work propely

Localization with DomainExtension does not work propely

2 posts, 0 answered
  1. UI Crew
    UI Crew avatar
    151 posts
    Registered:
    27 Sep 2012
    15 Oct 2009
    Link to this post
    Hi,

    Looks like someone may have made the mistake of assuming that a domain must have .com in it when you have localisation set to DomainExtension.

    When you select a different language domain from the language bar in SF admin that doesn't have a .com in it the url gets changed incorrectly. Consider the settings below in my web.config:

        <localization defaultProvider="Sitefinity" persistenceMode="DomainExtension" defaultCulture="en-AU" cultures="en-AU, en-NZ" allowSpecificCultures="true" autoSetClientLanguage="false"
          <providers> 
            <clear/> 
            <add name="Sitefinity" type="Telerik.Localization.Data.DefaultProvider, Telerik.Localization.Data" connectionStringName="DefaultConnection"/> 
          </providers> 
          <cultureMappings> 
            <add key="com.au" culture="en-AU" /> 
            <add key="co.nz" culture="en-NZ" /> 
          </cultureMappings> 
        </localization> 

    When I visit Sitefinity Admin on:

    http://test.com.au/Sitefinity/Admin/Default.aspx

    And use the language bar to select the New Zealand language, Sitefinity changes the domain to:

    http://test.com.co.nz/Sitefinity/Admin/Default.aspx

    It appears that it assumes that domains must have a .com in them.

    Is this a known bug or have i done something wrong?

    Thanks

    Seth
  2. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    Registered:
    01 Dec 2016
    15 Oct 2009
    Link to this post
    Hi Seth Cleaver,

    We know this issue. This problem appears because you use specific cultures. If you want to use specific cultures you should use DomainName value for persistenceMode property in the web.config file.
    Here is the code in the web.config file
    <localization defaultProvider="Sitefinity" persistenceMode="DomainName" defaultCulture="en-AU" cultures="en-AU, en-NZ" allowSpecificCultures="true" autoSetClientLanguage="false">
        <providers>
          <clear/>
          <add name="Sitefinity" type="Telerik.Localization.Data.DefaultProvider, Telerik.Localization.Data" connectionStringName="DefaultConnection"/>
        </providers>
        <cultureMappings>
          <add key="test.com.au" culture="en-AU" />
          <add key="test.co.nz" culture="en-NZ" />
        </cultureMappings>

    Hope this helps.

    Kind regards,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered