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

Forums / Developing with Sitefinity / Multy langualge support for news

Multy langualge support for news

8 posts, 0 answered
  1. tanmay
    tanmay avatar
    18 posts
    Registered:
    14 Aug 2007
    21 Sep 2009
    Link to this post
    Hi, we are using sitefinity 3.7. Out site support 2 languages. English and Arabic, Now we are facing problem with Arabic news. We have created News from "Modules>News" and using "News View" control for displaying news.
    Can you please suggest me how we can separately save Arabic News and How can i display it in front end.

    Please Advice me.

    Thank you in Advance
    Tanmay

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    21 Sep 2009
    Link to this post
    Hello tanmay,

    Sitefinity Standard Edition supports localization. You can enable it through your project web.config file - <localization> node by setting persistenceMode property. Then you need to enable the localization for News provider as shown below.

    </cms> 
            <cmsEngine defaultProvider="Generic_Content"
                <providers> 
                    <clear/> 
                    <add name="News"  allowLocalization="True" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Title" securityProviderName="" allowVersioning="True" applicationName="/News" versioningProviderName="" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.News.Data.DefaultNewsProvider, Telerik.News.Data"/> 

    enable localization for the content Item title.

    <add key="News.Title" localizable="true" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/> 

    By doing so you will have two language versions of your website. You need to drop NewsView control  on a page that is translated in Arabic and the other language  - let's say English. Then when you switch between the language versions the control will render the appropriate data.

    The Community Edition does not support localization.

    Sincerely yours,
    Ivan Dimitrov
    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.
  3. tanmay
    tanmay avatar
    18 posts
    Registered:
    14 Aug 2007
    21 Sep 2009
    Link to this post
    thanks for your help,
    I faced new problem, we divide our application under 2 Page group 'en' and 'ar', all English pages are under 'en' and all Arabic pages are under 'ar', we in web.config i can not use  "persistenceMode=PathPrefix", i have to use "persistenceMode=Querystring" which create problems it's more than 256 char.

    If i use "persistenceMode=None" then i did not get Language choser in admin, and i lose all my english data after doing cuple of time changes in web.config.

    My question is can i use get the funcationility of multy language support if i user "persistenceMode=None".?

    As i told you how we create ar/en in site url [by two page group]. Can you please help me to overcome this problem.
    Because in a CMS system News is a very important part.

    Thanks in Advance
    Tanmay
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    21 Sep 2009
    Link to this post
    Hello tanmay,

    persistenceMode="None" means that the localization is not activated. You need to choose one of the following options for your implementation:

           PathPrefix - he language code is inserted as folder in the URL right after application root.
            BrowserSettings - Language code is not explicitly persisted and always the first match from browser preferred languages is used.
            DomainName - The language is set per domain. This option could be used when you have different language versions and different domain for every language version.
            DomainExtension -  The language code comes from the top level domain, if it is a country domain (.uk, .it, .es, ...). Else the default language is used.

    All the best,
    Ivan Dimitrov
    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.
  5. tanmay
    tanmay avatar
    18 posts
    Registered:
    14 Aug 2007
    21 Sep 2009
    Link to this post
    Hi Ivan Dimitrov ,

    Thanks for your reply. I will try all the option , let's see what happend.

    Thanks again for your help

    Thanks and Regards
    Tanmay
  6. Dennis
    Dennis avatar
    19 posts
    Registered:
    26 May 2009
    02 Nov 2009
    Link to this post
    Hello Ivan

    I also have a site with 2 languages and use the PathPrefix option.

    When the user enters the address www.sitename.dk without specifying the language it automatically selects the preffered language from the browser settings.

    How do I avoid that and force a certain language selection?

    Regards,

    Dennis
  7. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    02 Nov 2009
    Link to this post
    Hi Dennis,

    Can you try to set the autoSetClientLanguage="false" this should prevent Sitefinity loading the localized UI based on client browser settings:
    <localization defaultProvider="Sitefinity" persistenceMode="PathPrefix" defaultCulture="en" autoSetClientLanguage="false" cultures="en, nl, fr, it">

    Sincerely yours,
    Radoslav Georgiev
    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.
  8. Dennis
    Dennis avatar
    19 posts
    Registered:
    26 May 2009
    02 Nov 2009
    Link to this post
    Thank you - it works perfectly (somebody just mixed up the languages)
Register for webinar
8 posts, 0 answered