Esempio n. 1
0
        /// <summary>
        /// Reads a template from the language file
        /// </summary>
        /// <param name="templateName">
        /// The template Name.
        /// </param>
        /// <param name="templateLanguageFile">
        /// The template Language File.
        /// </param>
        /// <returns>
        /// The template
        /// </returns>
        private string ReadTemplate(string templateName, string templateLanguageFile)
        {
            if (templateName.IsNotSet())
            {
                return(null);
            }

            if (templateLanguageFile.IsNotSet())
            {
                return(this.Get <ILocalization>().GetText("TEMPLATES", templateName));
            }

            var localization = new Localization.Localization();

            localization.LoadTranslation(templateLanguageFile);

            return(localization.GetText("TEMPLATES", templateName, templateLanguageFile));
        }