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
Hi,
I think that you could use LanguageBranchRepository:
var languageBranchRepository = ServiceLocator.Current.GetInstance<ILanguageBranchRepository>(); var languageBranches = languageBranchRepository.ListEnabled(); foreach (var languageBranch in languageBranches) { }
This code returns all enabled languages.
Or you could use domain mappings. To get currently enabled languages you could use the code:
var siteDefinition = SiteDefinition.Current; foreach (var hostDefinition in siteDefinition.Hosts) { //hostDefinition.Language }
The site definition contains host. And ech host have language.
Hi,
I would like to be able to populate a dropdownlist dinamically (with country/language), with the following requirements: