Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

GetCultureInfo with unknown key no longer fails on Windows 10

Fixed in

EPiServer.CMS.Core 9.4.0

(Or a related package)

Created

Oct 07, 2015

Updated

Dec 04, 2015

Area

CMS Core

State

Closed, Fixed and tested


Description

On Windows 10, CultureInfo.GetCultureInfo will no longer throw an exception for valid BCP-47 culture names, instead an Unknown Culture is returned. Invalid strings, i.e. non BCP-47 format, will still result in a CultureNotFoundException. We should review the code we have code that relies on the throwing behavior and see if we need to also check for any Unknown Cultures returned.

For details, see:

Identified methods:

  • EPiServer.Globalization.LanguageSelection.TryGetCulture()
  • EPiServer.Framework.Localization.CultureInfoExtensions.TranslateCultureName()
  • EPiServer.DataAbstraction.ILanguageBranchRepositoryExtensions.Load()
  • EPiServer.Web.Routing.ContentRoute.TryGetCultureInfo()