//TODO - use from base private Culture GetCultureInformationForPublishedContent(IPublishedContent content) { var culture = _umbracoHelper.GetCulture(content); var cultureInfo = CultureMappings.GetLocaleForCulture(culture.Name); return(cultureInfo); }
protected Culture GetCultureInformationForLanguage(string language) { if (!string.IsNullOrEmpty(language) && !string.IsNullOrWhiteSpace(language)) { var cultureInfo = CultureMappings.GetLocaleForCulture(language); return(cultureInfo); } return(null); }
private async Task <IEnumerable <SpecialtyViewModel> > RetrieveSpecialties(string culture) { var cultureInfo = CultureMappings.GetLocaleForCulture(culture); var specialtiesDto = await _registrationService.GetSpecialtiesAsync(cultureInfo.Locale); var specialtiesViewModel = _mapper.Map <IEnumerable <TextValuePairDTO>, IEnumerable <SpecialtyViewModel> >(specialtiesDto); return(specialtiesViewModel); }
private async Task <IEnumerable <ProfessionViewModel> > RetrieveProfessions(string culture) { var locale = CultureMappings.GetLocaleForCulture(culture).Locale; var professionsDto = await _registrationService.GetProfessionsAsync(locale); var professionsViewModel = _mapper.Map <IEnumerable <TextValuePairDTO>, IEnumerable <ProfessionViewModel> >(professionsDto); return(professionsViewModel); }