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

GetLanguage3Name() public method

public GetLanguage3Name ( string inLanguage ) : string
inLanguage string
return string
        public string GetLanguage3Name(string inLanguage)
        {
            try
            {
                if (string.IsNullOrEmpty(Language3Iso639Code))
                    return string.Empty;

                return GetLanguageName(Language3Iso639Code, inLanguage);
            }
            catch (Exception)
            {
                return "L2N-Unknown-" + Language3Iso639Code;
            }
        }

Usage Example

        public static void AddUIDictionaryToDom(HtmlDom pageDom, CollectionSettings collectionSettings)
        {
            XmlElement dictionaryScriptElement = pageDom.RawDom.SelectSingleNode("//script[@id='ui-dictionary']") as XmlElement;
            if (dictionaryScriptElement != null)
                dictionaryScriptElement.ParentNode.RemoveChild(dictionaryScriptElement);

            dictionaryScriptElement = pageDom.RawDom.CreateElement("script");
            dictionaryScriptElement.SetAttribute("type", "text/javascript");
            dictionaryScriptElement.SetAttribute("id", "ui-dictionary");
            var d = new Dictionary<string, string>();

            d.Add(collectionSettings.Language1Iso639Code, collectionSettings.Language1Name);
            if (!String.IsNullOrEmpty(collectionSettings.Language2Iso639Code) && !d.ContainsKey(collectionSettings.Language2Iso639Code))
                d.Add(collectionSettings.Language2Iso639Code, collectionSettings.GetLanguage2Name(collectionSettings.Language2Iso639Code));
            if (!String.IsNullOrEmpty(collectionSettings.Language3Iso639Code) && !d.ContainsKey(collectionSettings.Language3Iso639Code))
                d.Add(collectionSettings.Language3Iso639Code, collectionSettings.GetLanguage3Name(collectionSettings.Language3Iso639Code));

            d.Add("vernacularLang", collectionSettings.Language1Iso639Code);//use for making the vernacular the first tab
            d.Add("{V}", collectionSettings.Language1Name);
            d.Add("{N1}", collectionSettings.GetLanguage2Name(collectionSettings.Language2Iso639Code));
            d.Add("{N2}", collectionSettings.GetLanguage3Name(collectionSettings.Language3Iso639Code));

            AddLocalizedHintContentsToDictionary(pageDom, d, collectionSettings);

            dictionaryScriptElement.InnerText = String.Format("function GetDictionary() {{ return {0};}}", JsonConvert.SerializeObject(d));

            pageDom.Head.InsertAfter(dictionaryScriptElement, pageDom.Head.LastChild);
        }
All Usage Examples Of Bloom.Collection.CollectionSettings::GetLanguage3Name