Default site localization

Topics: Customizing Orchard, Localization
Aug 6, 2012 at 12:40 PM

Please help. How can i get default site localization id?

Aug 6, 2012 at 5:47 PM

What do you mean?

Aug 6, 2012 at 6:42 PM

This is current site culture:

int currentCultureId = _cultureManager.GetCultureByName(currentCulture).Id;

I need get default culture (Settings ->Default Site Culture )

Aug 8, 2012 at 2:35 PM

If you inject IOrchardServices, you'll be able to access the CurrentSite.SiteCulture property via WorkContext:

string currentCultureName = _orchardServices.WorkContext.CurrentSite.SiteCulture;

Aug 8, 2012 at 7:46 PM