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

Forums / Developing with Sitefinity / Multilingual Auto-Sense in Sitefinity 6.0

Multilingual Auto-Sense in Sitefinity 6.0

7 posts, 0 answered
  1. James
    James avatar
    4 posts
    Registered:
    25 Aug 2010
    09 Jun 2013
    Link to this post
    If I have my Sitefinity 6.0 home page translated into two languages, such as English and Turkish, how do I enable auto-sensing? For example, how do I get someone who has a Turkish language in their web browser to automatically go to the Turkish URL to the Turkish version of my home page instead of the default English home page?  Is this something that also needs to be set in the web.config? Apparently if you try toGoogle.com with Turkish language in your browser for example you will automatically be directed to the www.google.com.tr site. So I am looking for something similiar.
  2. James
    James avatar
    4 posts
    Registered:
    25 Aug 2010
    09 Jun 2013
    Link to this post
    There's apparently a feature request for what I am asking for from February 2013

    http://www.telerik.com/support/pits.aspx#/details/Issue=14175

    It looks like this feature used to work in version 3.7.

    Does anyone from the Sitefinity team have an update on when this will be implemented for version 6.0? Is there a way I can implement this using my project's web.config file or custom coding?
  3. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    11 Jun 2013
    Link to this post
    Hi James,

    As a standard Asp.Net application you will be able to achieve this through the Global.asax file. Use the following in the Session_Start() method of the Global.asax (if you do not have one in your project you need to create it) to get the client's default language and redirect to your needs:

    var lang = Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"];
               if (lang.StartsWith("tr"))
               {
                   Response.Redirect("~/myTurkishHome");
               }
               else
               {
                   Response.Redirect("~/myEnglishHome");
               }

    I hope this helps.

    Regards,
    Pavel Benov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. James
    James avatar
    4 posts
    Registered:
    25 Aug 2010
    12 Jun 2013 in reply to Pavel Benov
    Link to this post
    Hi Pavel,

      Are there any plans to have this ability done automatically in a future version of Sitefinity? 

      Also, if I were to add an additional page in Turkish, like an "About Us", would I need to make additional entries in the global.asax?

    -James
  5. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    14 Jun 2013
    Link to this post
    Hello James,

    What else you can try is to use the Personalization tool and specify user characteristics on the home page. You can specify the users by Location property and thus display the desired page to them if they fit the criteria. 

    Regards,
    Pavel Benov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. James
    James avatar
    4 posts
    Registered:
    25 Aug 2010
    14 Jun 2013 in reply to Pavel Benov
    Link to this post
    Hi Pavel,

    I have the Standard Edition license, so I don't have this feature. So back to my original two questions:

     Are there any plans to have this ability done automatically in a future version of Sitefinity?

    Also, if I were to add an additional page in Turkish, like an "About Us", would I need to make additional entries in the global.asax?

    Please let me know if you can answer these two questions.
  7. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    19 Jun 2013
    Link to this post
    Hello James,

    As the functionality you require is achievable with the Personalization module I would suggest to take a look at our Pricing and Licensing list and consider changing the type of license you are currently using. If that is not an option you could still work with the Global.asax solution I have previously provided.

    As the code executes in the Session_Start() method the redirect will be made when the user tries to access the site. After he is been redirected to the proper homepage he can then access the other pages based on the current cultuer (English or respectively Turkish). What this means is that you do not have to place any additional code in the Global.asax file for any new pages you add to your project. It is only important to redirect the user when he first accesses the site to the proper culture (which is already done with the provided solution).

    Regards,
    Pavel Benov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
7 posts, 0 answered