internal static LocalizationSettings ReadLocalizationSettings() { try { if (currentSettings == null) { lock (sync) { //Configuration config = WebConfigurationManager.OpenWebConfiguration("/", SPContext.Current.Site.WebApplication.Name); currentSettings = ConfigurationManager.GetSection(localizationSettingsSectionName) as LocalizationSettings; //currentSettings = config.GetSection(localizationSettingsSectionName) as LocalizationSettings; } } return(currentSettings); } catch (Exception) { //nothing configured //Do not log this exception return(null); } }
internal static LocalizationSettings ReadLocalizationSettings() { try { if (currentSettings == null) lock (sync) { //Configuration config = WebConfigurationManager.OpenWebConfiguration("/", SPContext.Current.Site.WebApplication.Name); currentSettings = ConfigurationManager.GetSection(localizationSettingsSectionName) as LocalizationSettings; //currentSettings = config.GetSection(localizationSettingsSectionName) as LocalizationSettings; } return currentSettings; } catch (Exception) { //nothing configured //Do not log this exception return null; } }