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

Forums / Developing with Sitefinity / Multilingual Tag

Multilingual Tag

2 posts, 0 answered
  1. BB
    BB avatar
    7 posts
    Registered:
    05 Oct 2012
    12 Sep 2014
    Link to this post
    Hi, I'm working on Multilingual Site and I'd like to get Custom Classifications in both main language(EN) and second language (FR). But when I write the code using by API, it's showed only main language only. How can I show those classifications in two languages?
  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    17 Sep 2014
    Link to this post
    Hi,

    You can try to get the taxon list after changing the current culture (and than sett it back). For example with Cars taxonomy name in En > MB and in Dutch > MB_NL (screenshot):

    TaxonomyManager manager = TaxonomyManager.GetManager();
     
                var tax = manager.GetTaxonomies<HierarchicalTaxonomy>().Where(t => t.Name == "cars").FirstOrDefault();
     
                string cultureName = "nl";
                var cultureInfo = new CultureInfo(cultureName);
     
                // Get the current culture
                var currentCulture = Thread.CurrentThread.CurrentUICulture;
     
                // Change it to the one you need (in that case Italian)
                Thread.CurrentThread.CurrentUICulture = cultureInfo;
     
     
                // Do the logic in the 'cultureName' language
                var taxaList = tax.Taxa;
     
     
                // Set back the current culture
                Thread.CurrentThread.CurrentUICulture = currentCulture;

    More information about Taxonomy API is available here.

    Regards,
    Svetoslav Manchev
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
2 posts, 0 answered