Example #1
0
        public virtual void TranslateItems(ITranslation translation)
        {
            string name = GetType().Name;

            TranslationUtils.TranslateProperty(name, this, "Description", translation);
            TranslationUtils.TranslateItemsFromFields(name, this, translation);
        }
        protected void TranslateItem(string itemName, object item)
        {
            var translation = Translator.GetTranslation(AppSettings.CurrentTranslation);

            if (translation.Count == 0)
            {
                return;
            }
            foreach (var pair in translation)
            {
                IEnumerable <Tuple <string, object> > itemsToTranslate = new[] { new Tuple <string, object>(itemName, item) };
                TranslationUtils.TranslateItemsFromList(Name, pair.Value, itemsToTranslate);
            }
        }
Example #3
0
        protected void TranslateItem(string itemName, object item)
        {
            var translation = Translator.GetTranslation(AppSettings.CurrentTranslation);

            if (translation.Count == 0)
            {
                return;
            }

            var itemsToTranslate = new[] { Tuple.Create(itemName, item) };

            foreach (var pair in translation)
            {
                TranslationUtils.TranslateItemsFromList(Name, pair.Value, itemsToTranslate);
            }
        }
Example #4
0
 public virtual void TranslateItems(ITranslation translation)
 {
     TranslationUtils.TranslateItemsFromFields(Name, this, translation);
 }
Example #5
0
 public virtual void AddTranslationItems(ITranslation translation)
 {
     TranslationUtils.AddTranslationItemsFromFields(GetType().Name, this, translation);
 }