Skip to main content
Version: 2.11.10

Humanizer.Localisation.NumberToWords.INumberToWordsConverter

INumberToWordsConverter Interface

An interface you should implement to localise ToWords and ToOrdinalWords methods

public interface INumberToWordsConverter

Methods

INumberToWordsConverter.Convert(long) Method

Converts the number to string using the locale's default grammatical gender

string Convert(long number);

Parameters

number System.Int64

Returns

System.String

INumberToWordsConverter.Convert(long, bool) Method

Converts the number to string using the locale's default grammatical gender with or without adding 'And'

string Convert(long number, bool addAnd);

Parameters

number System.Int64

addAnd System.Boolean

Specify with our without adding "And"

Returns

System.String

INumberToWordsConverter.Convert(long, GrammaticalGender, bool) Method

Converts the number to string using the provided grammatical gender

string Convert(long number, Humanizer.GrammaticalGender gender, bool addAnd=true);

Parameters

number System.Int64

gender GrammaticalGender

addAnd System.Boolean

Returns

System.String

INumberToWordsConverter.ConvertToOrdinal(int) Method

Converts the number to ordinal string using the locale's default grammatical gender

string ConvertToOrdinal(int number);

Parameters

number System.Int32

Returns

System.String

INumberToWordsConverter.ConvertToOrdinal(int, GrammaticalGender) Method

Converts the number to ordinal string using the provided grammatical gender

string ConvertToOrdinal(int number, Humanizer.GrammaticalGender gender);

Parameters

number System.Int32

gender GrammaticalGender

Returns

System.String