More in this section

Forums / Developing with Sitefinity / Creating Other Language pages

Creating Other Language pages

2 posts, 0 answered
  1. HRC
    HRC avatar
    44 posts
    16 Mar 2009
    27 Apr 2009
    Link to this post
    I am building a multi lingual site and I have created the entire English site. I would like to somehow generate the Other Language pages now including the Template and generic content controls.  Anyone know there is a way of doing this?

    Thank You
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    27 Apr 2009
    Link to this post
    Hello ChrisH,

    There are two ways - you can create a page and after you have enabled localization you can copy from other languages. Check out attached screenshot.

    Another option is to do this programmmaticlly.

            CmsManager cmsManager = new CmsManager(); 
            foreach (ICmsPage page in cmsManager.GetPages(Guid.Empty)) 
                if (!page.Name.Equals("MyPage1")) 
                CultureInfo currentCulture = CultureInfo.GetCultureInfo(page.LangID); 
                foreach (CultureInfo culture in LocalizationManager.Cultures.Values) 
                    if (culture.Equals(currentCulture)) 
                    Thread.CurrentThread.CurrentUICulture = culture; 
                    ICmsPage newPage = (ICmsPage)cmsManager.GetPage(page.ID, true); 
                    if (newPage.HasCurrentLanguageVersion) 
                    newPage.MenuName = String.Concat(page.MenuName, "_", culture.Name); 
                    IStagedPage staged = cmsManager.GetPage(newPage.ID, true).Staged; 
                    staged = cmsManager.GetPage(newPage.ID, true).Staged; 
                    Thread.CurrentThread.CurrentUICulture = currentCulture; 

    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.
2 posts, 0 answered