Exemplo n.º 1
0
        /// <summary>
        /// Tries to find a locale title for given tag
        /// </summary>
        /// <param name="tag"></param>
        /// <returns></returns>
        public string GetTagTitle(string tag)
        {
            if (_tagToTitleMap.ContainsKey(tag))
            {
                string localeTag;
                var    isTagHasLocale = StringResourceSystemFacade.TryGetString("Composite.Plugins.Components",
                                                                                _tagToTitleMap[tag].Replace("{", "").Replace("}", ""),
                                                                                out localeTag);
                if (isTagHasLocale)
                {
                    return(localeTag);
                }
                else
                {
                    return(_tagToTitleMap[tag]);
                }
            }

            return(tag);
        }