Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
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: