Open brycecr opened 9 years ago
This is essentially the same as issue #16
What I do for the moment is something like:
<any i18n="common.key-{{ myCount==1&&'signle'||'plural' }}" data-count="{{ myCount }}">
Which works just fine for a single/plural case avoiding filters.
I was thinking about ng-pluralize and angular-localization in the case where we have a phrase that is translated into two languages with different number of plural modes.
E.g., in english, we just want to use the simple rule one / other:
But if I then want translate to, say, russian, then the number of rules i need changes to 4 to something like:
However, I've already hardcoded the number of rules by setting them in the
when
attribute as such, so just translating theone
andother
options from the english version isn't enough to implement the above.So, what I'd really like to so is something like:
And then provide, in the translation for
pluralMsg
, a plural-sensitive string. This is the way it's handled in ICU format (e.g. formatjs and I can see why -- it makes a lot more sense to have the translator figure out the correct pluralization rules in the yaml/json file then to have devs set the plural branching.This leads me to few questions:
Thanks!