/// <summary> /// Gets the translation text of class and property in specified language. /// </summary> /// <param name="language">The language.</param> /// <param name="className">Name of the class.</param> /// <param name="propertyName">Name of the property.</param> /// <param name="macroDelegate">Delegate executed to each string macro.</param> /// <returns></returns> public TranslationProperty GetProperty(string language, string className, string propertyName, MacroDelegate macroDelegate) { TranslationProperty property = GetProperty(language, className, propertyName); property.Message = ReplaceMacros(property.Message, macroDelegate); return(property); }
/// <summary> /// Sets the translation text of class and property in specified language. /// </summary> /// <param name="language">The language.</param> /// <param name="className">Name of the class.</param> /// <param name="propertyName">Name of the property.</param> /// <param name="message">The value text.</param> /// <param name="isStatic">is property static?</param> public void SetProperty(string language, string className, string propertyName, string message, bool isStatic) { language = FindLanguage(language); if (ContainsKey(language) == false) { Add(language, new TranslationClasses()); } if (this[language].ContainsKey(className) == false) { this[language].Add(className, new TranslationProperties()); } this[language][className][propertyName] = new TranslationProperty(message, isStatic); }