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
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
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
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
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
INumberToWordsConverter.ConvertToTuple(int) Method
Converts integer to named tuple (e.g. 'single', 'double' etc.).
string ConvertToTuple(int number);
Parameters
number System.Int32