Open lsimoneau opened 10 years ago
I think it would be a good fit, but I've not tried to transfer those yet. Since I'm not using rails-asset-localization actively at the moment I might not get to adding that functionality any time soon.
what about overriding i18n.pluralExtension.addRule(lng, obj)
from: http://i18next.com/pages/doc_features.html
You can override the existing rules via i18n.pluralExtension.addRule(lng, obj)
but i guess it's only to figure out which count
option is plural rather than the key
an example for rails pluralization is:
date: {
prompts: {
x_month: {
one: "Monat",
other: "Monate",
}
}
}
i18next:
date: {
prompts: {
x_month: {
key: 'Monat',
key_plural: 'Monate',
}
}
};
Changing the interpolation configuration of i18next makes most translations from Rails compatible with i18next, but the libraries have fundamentally different approaches to plural forms, so translations with plurals can't be reused between Rails and JS.
Should this library include functionality to transform the plurals for i18next?