Esempio n. 1
0
        public string Find(string templateName, string languageCode = DefaultLanguageCode)
        {
            if (string.IsNullOrWhiteSpace(languageCode))
            {
                languageCode = DefaultLanguageCode;
            }

            var path = GetTemplatePath(templateName, languageCode);

            if (File.Exists(path))
            {
                var templateBody           = File.ReadAllText(path);
                var translatedTemplateBody = Localizer.Translate(templateBody, _resources.GetLocalizedDictionary(languageCode), "!!MISSING!!");
                return(translatedTemplateBody);
            }

            return(null);
        }