Less hacky way to lookup current user culture

This commit is contained in:
Per Ploug
2015-09-24 15:52:44 +02:00
parent c13ae20885
commit 8d57e0cd1d

View File

@@ -49,7 +49,7 @@ namespace Umbraco.Web.Trees
//try to look up a tree header matching the tree alias
var culture = CultureInfo.GetCultureInfo(Security.CurrentUser.Language.Replace("_", "-"));
var culture = Security.CurrentUser.GetUserCulture(Services.TextService);
var localizedLabel = Services.TextService.Localize("treeHeaders/" + _attribute.Alias, culture);
if (string.IsNullOrEmpty(localizedLabel) == false)
return localizedLabel;