/// <summary> /// Get escaped resource string from App_GlobalResources/Common.resx /// </summary> public static string CommonResource(this HtmlHelper htmlhelper, string expression, params object[] args) { var themeClass = themeNamesProvider.GetCurrentThemeName() + "Common,"; var resource = LocalizationHelpers.Resource(htmlhelper, themeClass + expression, args); return(String.IsNullOrEmpty(resource) ? LocalizationHelpers.Resource(htmlhelper, "Common," + expression, args) : resource); }
/// <summary> /// Gets escaped resource string from App_GlobalResources/Common.resx or from theme common folder. /// </summary> public static string GlobalCommonResource(this Controller controller, string expression, params object[] args) { var theme = themeNamesProvider.GetCurrentThemeName(); var themeClass = theme + "Common,"; var resource = LocalizationHelpers.GlobalResource(themeClass + expression, theme); return(string.IsNullOrWhiteSpace(resource) ? LocalizationHelpers.Resource(controller, "Common," + expression, args) : resource); }