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

Forums / General Discussions / Export for localization - Import post localization

Export for localization - Import post localization

4 posts, 0 answered
  1. Dmitry Shesterin
    Dmitry Shesterin avatar
    4 posts
    Registered:
    14 May 2010
    29 Nov 2010
    Link to this post
    Hello,

    I am on 3.7 and would like to localize my site. The localizing company asked me to provide an export of the pages that need to be localized as .xml export. According to them this is how they deal with other localization projects for sites managed with a CMS.

    Could you please let me know what the correct procedure for me is to export my pages as XML for localization and to be able to import those localized versions back in?

    Thank you.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    29 Nov 2010
    Link to this post
    Hi Dmitry,

    All data is stored in the database - there is no static content or static pages that you can easily export. The idea is that you should use content modules to enter the data and then use presentation controls like NewsView, EventsView etc to show this data. The pages actually are formed by user and custom controls which are your presentation layer. The correct way to do your translation is getting the connect of an item in the current language, then translate the content in another language and port it. You have to use Generic Content API - Modules API Overview.

    To get or set a content for a given language you have to set the CurrentUICulture


    System.Threading.Thread.CurrentThread.CurrentUICulture = cult;
     
    var cntItem = Manager.GetContent(someID);
    cntItem.Language = cult.Name;
    var content = "some content;
     
    ....
    Manager.SaveContent(cntItem);
     

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Dmitry Shesterin
    Dmitry Shesterin avatar
    4 posts
    Registered:
    14 May 2010
    30 Nov 2010
    Link to this post
    Ivan, thank you for looking into this. I am sure I am not the first to inquire about best practice of localizing a site running Sitefinity.

    Could you please explain to me in layman's terms what the process is going to be for me to extract the content for a third party localization and how am I going to bring it back in and populate the appropriate pages?

    Thank you
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Nov 2010
    Link to this post
    Hi Dmitry,

    You should not touch the pages. You have to modify the content that populates the pages.

    1. Use Manager.GetContent(someID); to get item content and store the item ID and its data in XML or CSV.
    2. Translate the content
    3. Read the CSV file and its columns and using the API create a new language version for a given content item.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered