示例#1
0
        //TODO - use from base
        private Culture GetCultureInformationForPublishedContent(IPublishedContent content)
        {
            var culture     = _umbracoHelper.GetCulture(content);
            var cultureInfo = CultureMappings.GetLocaleForCulture(culture.Name);

            return(cultureInfo);
        }
示例#2
0
 protected Culture GetCultureInformationForLanguage(string language)
 {
     if (!string.IsNullOrEmpty(language) && !string.IsNullOrWhiteSpace(language))
     {
         var cultureInfo = CultureMappings.GetLocaleForCulture(language);
         return(cultureInfo);
     }
     return(null);
 }
示例#3
0
        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);
        }
示例#4
0
        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);
        }