jamesarosen / ember-i18n

Other
765 stars 184 forks source link

How to deal with genders? #408

Closed IAmJulianAcosta closed 5 years ago

IAmJulianAcosta commented 8 years ago

I'm trying to translate some things to spanish with has genders, but I can't find how to do this. Is this supported?

jamesarosen commented 8 years ago

Sadly, it's not. ember-i18n inherited its translation model from Rails, which only supported pluralization, not full ICU Message strings.

You could override ember-i18n/utils/locale.prototype.findTranslation to handle inflection based on gender of the subject or object.

ember-intl does support ICU Message format. Ideally, ember-i18n will eventually merge with that project.

ieugen commented 7 years ago

Use ICU MessageFormat style instead of this. It's industry standard and supports plurals and genders and all the likes. It has a JavaScript implementation https://messageformat.github.io/

vvscode commented 7 years ago

Hope this one https://github.com/jamesarosen/ember-i18n/pull/418 will be helpfull to redefine Locale.prototype.findTranslation

jamesarosen commented 5 years ago

jamesarosen/ember-i18n has been deprecated in favor of ember-intl.