diff --git a/src/Humanizer/Configuration/FormatterRegistry.cs b/src/Humanizer/Configuration/FormatterRegistry.cs index da6839ad4..9970c6a21 100644 --- a/src/Humanizer/Configuration/FormatterRegistry.cs +++ b/src/Humanizer/Configuration/FormatterRegistry.cs @@ -1,4 +1,6 @@ -using Humanizer.Localisation.Formatters; +using System.Globalization; + +using Humanizer.Localisation.Formatters; namespace Humanizer.Configuration { @@ -56,7 +58,14 @@ public FormatterRegistry() : base(new DefaultFormatter("en-US")) private void RegisterDefaultFormatter(string localeCode) { - Register(localeCode, new DefaultFormatter(localeCode)); + try + { + Register(localeCode, new DefaultFormatter(localeCode)); + } + catch (CultureNotFoundException) + { + // Some OS's may not support the particular culture. Not much we can do for those. + } } private void RegisterCzechSlovakPolishFormatter(string localeCode)