U4-7873 - fix GetCulture issue with languages
This commit is contained in:
@@ -78,16 +78,14 @@ namespace Umbraco.Web.Models
|
||||
domain = pos == 0
|
||||
? null
|
||||
: domainHelper.DomainForNode(int.Parse(route.Substring(0, pos)), current).UmbracoDomain;
|
||||
}
|
||||
}
|
||||
|
||||
if (domain == null || domain.LanguageIsoCode.IsNullOrWhiteSpace())
|
||||
return GetDefaultCulture(localizationService);
|
||||
var rootContentId = domain == null ? -1 : domain.RootContentId;
|
||||
var wcDomain = DomainHelper.FindWildcardDomainInPath(domainService.GetAll(true), contentPath, rootContentId);
|
||||
|
||||
var wcDomain = DomainHelper.FindWildcardDomainInPath(domainService.GetAll(true), contentPath, domain.RootContentId);
|
||||
|
||||
return wcDomain == null
|
||||
? new CultureInfo(domain.LanguageIsoCode)
|
||||
: new CultureInfo(wcDomain.LanguageIsoCode);
|
||||
if (wcDomain != null) return new CultureInfo(wcDomain.LanguageIsoCode);
|
||||
if (domain != null) return new CultureInfo(domain.LanguageIsoCode);
|
||||
return GetDefaultCulture(localizationService);
|
||||
}
|
||||
|
||||
private static CultureInfo GetDefaultCulture(ILocalizationService localizationService)
|
||||
|
||||
Reference in New Issue
Block a user