Multilingual Tag

Posted by Community Admin on 04-Aug-2018 16:27

Multilingual Tag

All Replies

Posted by Community Admin on 12-Sep-2014 00:00

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?

Posted by Community Admin on 17-Sep-2014 00:00

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
 

This thread is closed