Open Drizin opened 7 years ago
This contains the same commits as #323 - would it be easier to push it all as one pull request?
Do these changes support plural forms or is it just a conditional statement?
Yes, #324 supports number inflections (plural forms) and gender inflections by using conditional statements. Although #323 isolated may look simple and unnecessary, it's crucial for #324 to work (that's why #324 contains #323 commits). I submitted #323 individually because I think the purpose of conditionals (#323) is much easier to understand than the purpose of extension attributes (#324).
BTW: #322 is completely unrelated. THAT shouldn't be part of this pull request. Sorry.
Extension Attributes
Conditionals allow you to create conditional translations depending on the argument itself, but sometimes the decision must not be made on something that you know in advance but rather on some language-specific attribute. For example, "map" in portuguese is masculine gender but in french it's feminine gender.
Portuguese:
French:
This is based on https://github.com/siefca/i18n-inflector