Bloom.Collection.CollectionSettings.GetLanguageName C# (CSharp) Method

GetLanguageName() public method

Get the name of the language whose code is the first argument, if possible in the language specified by the second. If the language code is unknown, return it unchanged.
public GetLanguageName ( string code, string inLanguage ) : string
code string
inLanguage string
return string
        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);
        }