Humanizr / Humanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities
Other
8.51k stars 947 forks source link

Localisation "ToWords" pt-PT for European portuguese no longer available #1296

Open TMK1912 opened 9 months ago

TMK1912 commented 9 months ago

Hi. I have been using the Humanizer package to convert numbers into words in portuguese language. I am currently using the latest version which is the 2.14.1 version. I am calling the method ToWords as follows: string text = number.ToWords(new CultureInfo("pt-PT")); whereby "number" is an integer. However the output "text" is given in brazilian portuguese instead of european portuguese. I have looked into the older issues that were raised here and i saw that at some point there was a version for portuguese language that was available. It has been replaced with the brazilian portuguese one. Is there a way to get the european portuguese version back for the NumberToWordsConverterRegistry? Thanks

ogix commented 7 months ago

Have you tried providing new CultureInfo("pt") ? It is registered with this locale.