From 9a5923771d4c9846c72dbff787fa30f549277458 Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 6 Mar 2015 16:05:37 +1100 Subject: [PATCH] fixes changing the underscore of a user language to culture. --- src/Umbraco.Core/Models/UserExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Models/UserExtensions.cs b/src/Umbraco.Core/Models/UserExtensions.cs index 99f72b8fb8..bd670f3836 100644 --- a/src/Umbraco.Core/Models/UserExtensions.cs +++ b/src/Umbraco.Core/Models/UserExtensions.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Models { try { - var culture = CultureInfo.GetCultureInfo(userLanguage); + var culture = CultureInfo.GetCultureInfo(userLanguage.Replace("_", "-")); //TODO: This is a hack because we store the user language as 2 chars instead of the full culture // which is actually stored in the language files (which are also named with 2 chars!) so we need to attempt // to convert to a supported full culture