-
Notifications
You must be signed in to change notification settings - Fork 965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - Number to words localisation improvements #149
Conversation
Move English, Arabic and Farsi converters to a separate strategies.
…ic fields to reduce allocations.
Related to #132 |
RE: Unsupported languages - Throwing an error would just upset people using it, at least the number would still have usable code. |
Yep, I do not like exceptions here as well |
…resentation of a number
@@ -65,11 +65,16 @@ | |||
<AssemblyOriginatorKeyFile>Humanizer.snk</AssemblyOriginatorKeyFile> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<Compile Include="Localisation\DefaultNumberToWordsConverter.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. I think we'll need to structure the Localisation folder a bit better; but good for now.
Thanks for your great contribution @hazzik. This is now released to NuGet as v1.19.1. |
I'm trying to improve experience and encourage users to localise ToWords/ToOrdinalWords extension methods.
I've introduced
INumberToWordsConverter
:Also I want to clarify how shall behave untranslated converter? Shall it throw
NotSupportedException
or just returnnumber.ToString()
?