public string GetLanguageName(string code, string inLanguage)
{
//profiling showed we were spending a lot of time looking this up, hence the cache
if (!_isoToLangNameDictionary.ContainsKey(code))
{
string name;
_lookupIsoCode.GetBestLanguageName(code, out name);
_isoToLangNameDictionary[code] = name;
}
return GetLanguageNameInUILangIfPossible(_isoToLangNameDictionary[code], inLanguage);
}