/// <summary> /// Gets the default numeric error language id associated with a <see cref="SiteCodeType"/>. /// </summary> /// <param name="SiteCodeType">The <see cref="SiteCodeType"/> to resolve.</param> /// <returns>The numeric language id.</returns> public static int GetDefaultErrorLanguageID(SiteCodeType SiteCodeType) { int siteID = SiteUtility.GetSiteID(SiteCodeType); if (!Enum.IsDefined(typeof(ErrorLanguageValueEnum), siteID)) { return(0); } else { return(siteID); } }
/// <summary> /// Gets the <see cref="ErrorLanguageCodeType"/> associated with a <see cref="SiteCodeType"/>. /// </summary> /// <param name="SiteCodeType">The <see cref="SiteCodeType"/> to resolve.</param> /// <returns>The <see cref="ErrorLanguageCodeType"/>.</returns> public static ErrorLanguageCodeType GetDefaultErrorLanguageCodeType(SiteCodeType SiteCodeType) { int siteID = SiteUtility.GetSiteID(SiteCodeType); if (siteID == 100) { return(ErrorLanguageCodeType.en_US); } else if (!Enum.IsDefined(typeof(ErrorLanguageValueEnum), siteID)) { return(ErrorLanguageCodeType.CustomCode); } else { return((ErrorLanguageCodeType)Enum.Parse(typeof(ErrorLanguageCodeType), Enum.GetName(typeof(ErrorLanguageValueEnum), siteID))); } }