Exemple #1
0
        public async Task <string> GetTextAsync(string key, params string[] placeholders)
        {
            Text template = await _dbContext.Texts.Where(x => x.Key == key).SingleAsync();

            string templateContent = template.ContentDe;

            switch (_cultureService.GetCurrentLanguage())
            {
            case Language.En:
                templateContent = template.ContentEn;
                break;

            case Language.De:
                templateContent = template.ContentDe;
                break;
            }
            string result = string.Format(templateContent, placeholders);

            return(result);
        }