Try Now
More in this section

Forums / General Discussions / Localization issue using API

Localization issue using API

2 posts, 0 answered
  1. abhishek
    abhishek avatar
    9 posts
    07 Apr 2011
    26 Apr 2011
    Link to this post

    By using following code I am only able to get the Default Content that is the English version of content .
    I have also created the Spanish version of  the Pages but the following code do not return those Spanish Content .
    Can you Please Guide me how could I get other version of Content .
    ContentManager contentManager = new ContentManager();
                IList listOfContentItems = contentManager.GetContent();
                if (listOfContentItems.Count > 0)
                    foreach (Telerik.Cms.Engine.IContent contentItem in listOfContentItems)

    and can you please guide me how I can create the different version of pages using API

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    03 May 2011
    Link to this post
    Hi abhishek,

    Thank you for using our services.

    The GetContent() method of any content manager uses the current UI culture of the current thread. In order to get content for different versions before you run the code you will have to change the CurrentUICulture of the current thread to the culture you want to get content from.

    Radoslav Georgiev
    the Telerik team
    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
2 posts, 0 answered