Ejemplo n.º 1
0
        public string GetText(string Tag)
        {
            tLanguage tLanguage = null;

            if (this.SessionLanguage != null)
            {
                tLanguage = this.SessionLanguage();
            }

            return(this.GetText(tLanguage, Tag));
        }
Ejemplo n.º 2
0
 public void UpdateTexts(List <vTagLanguage> texts, tLanguage tlanguage)
 {
     if (!this.ContainsLanguage(tlanguage))
     {
         IEnumerable <KeyValuePair <string, vTagLanguage> > values = texts.Select(x => new KeyValuePair <string, vTagLanguage>(x.vchTagName, x));
         this.Texts[tlanguage.IDLanguage] = new ConcurrentDictionary <string, vTagLanguage>(values);
     }
     else
     {
         texts.ForEach(x => this.Texts[tlanguage.IDLanguage][x.vchTagName] = x);
     }
 }
Ejemplo n.º 3
0
        public string GetText(tLanguage tLanguage, string Tag)
        {
            if (tLanguage != null && this.Texts.ContainsKey(tLanguage.IDLanguage))
            {
                if (!this.Texts[tLanguage.IDLanguage].ContainsKey(Tag))
                {
                    if (this.OnSameTag != null)
                    {
                        this.OnSameTag(Tag);
                        return(Tag);
                    }
                    return(Tag + "_NOT_FOUND");;
                }

                return(this.Texts[tLanguage.IDLanguage][Tag].vchText);
            }

            return(Tag + "_NOT_FOUND");
        }
Ejemplo n.º 4
0
 public IEnumerable <vTagLanguage> GetTexts(tLanguage tLanguage)
 {
     return(this.GetTexts(tLanguage.IDLanguage));
 }
Ejemplo n.º 5
0
 public bool ContainsLanguage(tLanguage tlanguage)
 {
     return(this.ContainsLanguage(tlanguage.IDLanguage));
 }