/// <summary> /// Gives the friendly name of the language with the given code. /// </summary> /// <param name="languageCode">The language code.</param> /// <returns>The friendly name of the language.</returns> public static string Decode(string languageCode) { if (LanguageMap.ContainsKey(languageCode)) { return(LanguageMap[languageCode]); } return("Unknown"); }
protected Language ResolveLanguage(IEntity entity) { var entityLang = entity.GetLanguageName().TrimStart().TrimEnd(); if (entityLang.IsNullOrEmpty()) { return(LanguageManager.DefaultLanguage); } if (!LanguageMap.ContainsKey(entityLang)) { return(LanguageManager.DefaultLanguage); } var scLanguage = LanguageMap[entityLang]; if (scLanguage.IsNullOrEmpty()) { return(LanguageManager.DefaultLanguage); } return(scLanguage.ParseLanguage()); }