Comments (10)
@hazzik - could you please explain what you mean by this?
from humanizer.
Sorry for long being quiet a long time. I'll try to explain.
The idea was to bring that grammatical categories to the library to simplify localisation, Internationalisation and globalisation easier to languages with that categories.
As first example we could make a common mechanism to identify grammatical number category, and based on this rule select a correct resource key.
For English: 1 => singular; 2 => dual; 3 => plural, etc
For Russian: 1 => singular; 2,3,4=>paucal; 5 => plural.
Later I plan to implement localisation for Russian using that approach.
from humanizer.
From what I saw by now I think that GrammaticalNumber
should be a local concept of each language specific formatter, as different languages do have different cases for it and it only depends on the number being formatted. So I would not introduce it as public concept of the API.
Even if the cases of GrammaticalCase
and GrammaticalGender
also differ from language to language, these concepts need to be public to control the output of ToWords
and ToOrdinalWords
as parameters to this methods.
from humanizer.
As mentioned in my previous comment I added GrammaticalCase
and GrammaticalGender
in #147.
GrammaticalGender
is currently not used, but I'll be using it when implementing ToOrdinalWords
in russian translation.
from humanizer.
Awesome! I'll be integrating these into my #188 Spanish ordinal translation as well.
from humanizer.
I think it's safe to close this now that #147 is in. You agree guys?!
from humanizer.
👍 from me.
from humanizer.
@mexx so how is the GrammaticalNumber going to fit into this (for ordinal localisations)?
from humanizer.
For ordinal localisations only case and gender is needed. Grammatical number is determined by the number being formatted.
from humanizer.
Thanks for the response. Closing this. This was a burden I had NO idea about and I'm glad it's sorted. Thanks a lot.
from humanizer.
Related Issues (20)
- Is this library still maintained? HOT 29
- How do I specify a culture? HOT 5
- Missing entries in Resources.it.resx HOT 1
- intermittent bug in TimeOnly.Humanize
- Problem in Camelize method HOT 2
- toMetric() enhancements
- TimeSpan Humanize ignored toWords: false parameter HOT 2
- Code Quality: Enable .NET PublishTrimmed
- Incorrect usage of paucal grammatical number for pl for time units
- FR: alternative EnumCache and extensions to De/Humanize enums
- How to show smaller than milliseconds for TimeSpan? HOT 1
- Pluralize/Singularize - Process HOT 2
- Convert month number to text. Ex: 1 = "January" HOT 3
- Pluralization of Taxes. HOT 2
- Latest Beta 13 is still not compatible with .net 8 HOT 2
- Can we solve the problem of AIGC detection?
- TimeSpanHumanize_MultipleMilliseconds issue
- RomanNumeralExtensions.FromRoman incorrectly handles Latin Small Letter Dotless I
- The Enum Humanizer Conversion to its Description not working on .Net 7 Project HOT 7
- Mixed languages in TimeToClockNotation (ITimeOnlyToClockNotationConverter implementations do not forward the culture to ToWord)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from humanizer.