I have set News module to be localizable. (<localization defaultProvider="Sitefinity" persistenceMode="QueryString" defaultCulture="cs" cultures="cs, en, de"> and so on)
It works fine, but my problem is generating Multilanguage News via C# code – I have to prepare migration from old system into Sitefinity. I have seen here in the forum a snippet code using your API for creating content and I tried to modify it for generating news in foreign language.
Here is the code:
|Telerik.News.NewsManager newsManager = new Telerik.News.NewsManager("News"); |
|Telerik.Cms.Engine.IContent submittedNews = newsManager.Content.CreateContent("text/html"); |
|submittedNews.Language = "en"; |
|submittedNews.SetMetaData("Title", "Novelty of the day "); |
|submittedNews.SetMetaData("Expiration_Date", DateTime.Now.AddMonths(12)); |
|submittedNews.SetMetaData("Publication_Date", DateTime. Now); |
|submittedNews.SetMetaData("Author", "Pisalek"); |
|submittedNews.SetMetaData("Summary", "This is the summary"); |
|submittedNews.Content = "Content BLA BLA "; |
When I look in Modules\News, the item created in english section looks ok, but unfortunately this item occurred also in default czech section without text in title.
I created Multilanguage page with NewsList control. When I browse website, then on cs page this item isn’t shown (OK), but on en page is shown twice.
May you explain me, where is the problem in content? When I create news trough the Sitefinity admin UI, then news are shown in their language’s sections ok.
I’m using Sitefinity v. 3.2beta
Thank you for your help