Current language branch in SelectionFactory

Vote:
 

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.

#87743
Jun 22, 2014 1:16
Vote:
 

Something like:

var languageBranchRepository = ServiceLocator.Current.GetInstance<ILanguageBranchRepository>();
var language = languageBranchRepository.Load(CultureInfo.CurrentUICulture);

#87754
Jun 23, 2014 8:47
Vote:
 

Hmm. I believe that gives me the language of the UI and not the language branch I'm currently working in.

#87882
Jun 24, 2014 21:04
Vote:
 

EPiServer.Globalization.ContentLanguage.PreferredCulture

should provide you the current working language.

#87919
Jun 25, 2014 15:48
Vote:
 

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)

#88267
Jul 08, 2014 20:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.