This project is read-only.

Default site localization

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

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

Aug 6, 2012 at 6:47 PM

What do you mean?

Aug 6, 2012 at 7: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 3: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 8:46 PM