Try our conversational search powered by Generative AI!

How to get the default language?

Vote:
 
Hi all, Can anyone tell me how do I get the default language branch (or the name or ID of it) in EPiServer 5? In EPiServer 4 I was able to use: EPiServer.Global.EPConfig["EPsLanguage"] as String; But this has gone in EPiServer 5, and I can't spot anything likely in EPiServer.Configuration.Settings.Instance According to the API documentation there's meant to be a method: LanguageBranch.LoadDefaultd, but this method appears not to exist. Any advice gratefully received! Cheers, Andy
#15952
Jan 08, 2008 11:48
Vote:
 
Hi! For the release version you can either use LanguageBranch.LoadSystem() to load the branch with id 1. If you have changed the default branch you should instead use LangauageBranch.List() and return the first enabled branch (there is an method called ListEnabled but I'm not sure if that exists in the release version). In SP1 that will be out soon you should instead use a new method called EPiServer.DataAbstraction.LanguageBranch.LoadFirstEnabledBranch();
#16684
Jan 08, 2008 17:42
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.