More in this section

Forums / Developing with Sitefinity / multilingual news archive

multilingual news archive

7 posts, 0 answered
  1. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    26 Jun 2009
    Link to this post
    is it possible to have the news archive dates multilingual?

    using 32.sp2

    what solutions are there ?
  2. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    29 Jun 2009
    Link to this post
    can anyone comment on this please?

    i've got a bunch of english dates i need to change to another language

    i.e
    jan
    feb
    march

    thanks
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 Jun 2009
    Link to this post
    Hi Quade,

    There are two options.

    1. Set globalization element in your web config and specify the culture. Note that this will affect the whole website not just the NewsArchive contorol

    <system.web> 
    <globalization culture="bg-BG"/> 
     
    ...... 
     
     
    </system.web> 

    2. Another option is converting DataTime to string, but this approach will require to override the control and all methods, because CreateArchiveItemText method is protected.

    CultureInfo culture = new CultureInfo("bg-BG"); 
    string bgDateTime = publicationDate.ToString("D", culture); 


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    30 Jun 2009
    Link to this post
    thanks ivan

    forgot to mention the site is a multilingual site with 2 langugues

    So i need these dates to be in 2 languages, is there a resource file that controls these?
    is the news archive multilingual?

    what option would you suggest based on the above info?

    Thanks

  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 Jun 2009
    Link to this post
    Hi Quade,

    You can have only one type of culture for the control. The first approach will work only with setting an property. The second require to hardcode the culture, so it will not allow you to have two cultures.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    30 Jun 2009
    Link to this post
    Thanks Ivan

    So what you are saying is the CMS isn't multilingual on the news module (when displaying archive dates)?

    is there a work around for this? 
    as i was under the impression the CMS was fully multilingual, and the client wont budge on this

    thanks


  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 Jun 2009
    Link to this post
    Hi Quade,

    Let me clarify the satiation.

    "2. Another option is converting DataTime to string, but this approach will require to override the control and all methods, because CreateArchiveItemText method is protected."
    You can also create a CustomDataSource and use it. The control expose CustomDataSource property.
    We are taking for the control, not for the module. The dates culture depends on the CultureInfo. The following method  CreateArchiveItemText that creates the archive item text is private. There we set the DateFormat property.
     return new DateTime(year, month,1).ToString(DateFormat);

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
7 posts, 0 answered