Provides a configuration point for Humanizer
public static class ConfiguratorInheritance System.Object → Configurator
A registry of formatters used to format collections based on the current locale
public static Humanizer.LocaliserRegistry<Humanizer.ICollectionFormatter> CollectionFormatters { get; }Humanizer.LocaliserRegistry<ICollectionFormatter>
The strategy to be used for DateOnly.Humanize
public static Humanizer.IDateOnlyHumanizeStrategy DateOnlyHumanizeStrategy { get; set; }This property should be set only once during application startup before any humanization operations occur. For thread-safety, use volatile reads or appropriate synchronization when accessing this property in multi-threaded scenarios. In production applications, avoid changing this value after the application has started serving requests.
A registry of ordinalizers used to localise Ordinalize method
public static Humanizer.LocaliserRegistry<Humanizer.IDateOnlyToOrdinalWordConverter> DateOnlyToOrdinalWordsConverters { get; }Humanizer.LocaliserRegistry<IDateOnlyToOrdinalWordConverter>
The strategy to be used for DateTime.Humanize
public static Humanizer.IDateTimeHumanizeStrategy DateTimeHumanizeStrategy { get; set; }This property should be set only once during application startup before any humanization operations occur. For thread-safety, use volatile reads or appropriate synchronization when accessing this property in multi-threaded scenarios. In production applications, avoid changing this value after the application has started serving requests.
The strategy to be used for DateTimeOffset.Humanize
public static Humanizer.IDateTimeOffsetHumanizeStrategy DateTimeOffsetHumanizeStrategy { get; set; }IDateTimeOffsetHumanizeStrategy
This property should be set only once during application startup before any humanization operations occur. For thread-safety, use volatile reads or appropriate synchronization when accessing this property in multi-threaded scenarios. In production applications, avoid changing this value after the application has started serving requests.
A registry of ordinalizers used to localise Ordinalize method
public static Humanizer.LocaliserRegistry<Humanizer.IDateToOrdinalWordConverter> DateToOrdinalWordsConverters { get; }Humanizer.LocaliserRegistry<IDateToOrdinalWordConverter>
A registry of formatters used to format strings based on the current locale
public static Humanizer.LocaliserRegistry<Humanizer.IFormatter> Formatters { get; }Humanizer.LocaliserRegistry<IFormatter>
A registry of number to words converters used to localise ToWords and ToOrdinalWords methods
public static Humanizer.LocaliserRegistry<Humanizer.INumberToWordsConverter> NumberToWordsConverters { get; }Humanizer.LocaliserRegistry<INumberToWordsConverter>
A registry of ordinalizers used to localise Ordinalize method
public static Humanizer.LocaliserRegistry<Humanizer.IOrdinalizer> Ordinalizers { get; }Humanizer.LocaliserRegistry<IOrdinalizer>
The strategy to be used for TimeOnly.Humanize
public static Humanizer.ITimeOnlyHumanizeStrategy TimeOnlyHumanizeStrategy { get; set; }This property should be set only once during application startup before any humanization operations occur. For thread-safety, use volatile reads or appropriate synchronization when accessing this property in multi-threaded scenarios. In production applications, avoid changing this value after the application has started serving requests.
A registry of time to clock notation converters used to localise ToClockNotation methods
public static Humanizer.LocaliserRegistry<Humanizer.ITimeOnlyToClockNotationConverter> TimeOnlyToClockNotationConverters { get; }Humanizer.LocaliserRegistry<ITimeOnlyToClockNotationConverter>
The strategy used by the System.TimeSpan humanization extension methods.
public static Humanizer.ITimeSpanHumanizeStrategy TimeSpanHumanizeStrategy { get; set; }This property should be set only once during application startup before any humanization operations occur. For thread-safety, use volatile reads or appropriate synchronization when accessing this property in multi-threaded scenarios. In production applications, avoid changing this value after the application has started serving requests.
Determines whether Humanizer includes complete generated locale support for the specified culture.
public static bool IsCultureSupported(System.Globalization.CultureInfo culture);culture System.Globalization.CultureInfo
The culture to check.
System.Boolean
true when the culture or one of its named parents has generated locale support; otherwise, false.
System.ArgumentNullException
Thrown when culture is null.
This considers parent-culture fallback, but does not report support merely because Humanizer can fall back to its default English localizers.
Use a predicate function for description property of attribute to use for Enum.Humanize
public static void UseEnumDescriptionPropertyLocator(System.Func<System.Reflection.PropertyInfo,bool> func);func System.Func<System.Reflection.PropertyInfo,System.Boolean>