World is now on Opti ID! Learn more
AI OnAI Off
World is now on Opti ID! Learn more
Something like:
var languageBranchRepository = ServiceLocator.Current.GetInstance<ILanguageBranchRepository>();
var language = languageBranchRepository.Load(CultureInfo.CurrentUICulture);
Hmm. I believe that gives me the language of the UI and not the language branch I'm currently working in.
EPiServer.Globalization.ContentLanguage.PreferredCulture
should provide you the current working language.
Great, thank you Khan!
Sorry for the late reply. (For some reason I get an error message as I try to mark it as solved but I'll try again later)
In my selection factory class for my custom property, how can I get to the current language branch? I can't seem to find a good way to get to it.