Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
PageDataCollection languagesForSomePage = EPiServer.DataFactory.Instance.GetLanguageBranches(somePageLink);
I usually do it like that. Then check pagedata.LanguageBranch for each item in the collection.
Thanks Johan,
Your code work fine, now I get the supported language codes, like "en", "sv" etc. But in episerver edit mode, at the "Show page tree:" dropdown list I can see the full name of the language, like "English", "Svenska" etc. Ofcourse I can do an own translator of the codes but I prefer to use the same translator as EPiServer use for this. Do you know how to do this, I mean...how do I get "English" instead of "en"?
You should have that as a property on LanguageBranch:
LanguageBranch branch = LanguageBranch.Load(pagedata.LanguageID);
Hi,
In EPiServer EDIT page, where you create new pages, you have a dropdown box at the bottom of the left menu that shows all the supported languages of the site. I need an own dropdown box in my startpage that shows exactly the same languages as the dropdown box in edit mode. How do I retreive the supported EPiServer languages from my code and populate my dropdown box with these?
Thanks
Mikael