예제 #1
0
        public FileResult LanguageConverter(RemoveHtmlModel model, string lang)
        {
            string result;
            var converter = new LanguageConverter();

            switch (lang)
            {
                case "en-us":
                    result = converter.BritishToAmericanEnglish(model.Html);
                    break;
                default:
                    result = converter.AmericanToBritishEnglish(model.Html);
                    break;
            }

            return this.File(Encoding.Unicode.GetBytes(result), "text/plain", "convert-english.txt");
        }