i18n-js
Version:
A small library to provide I18n on JavaScript.
24 lines • 583 B
JavaScript
export const ru = (_i18n, count) => {
const mod10 = count % 10;
const mod100 = count % 100;
let key;
const one = mod10 === 1 && mod100 !== 11;
const few = [2, 3, 4].includes(mod10) && ![12, 13, 14].includes(mod100);
const many = mod10 === 0 ||
[ ].includes(mod10) ||
[ ].includes(mod100);
if (one) {
key = "one";
}
else if (few) {
key = "few";
}
else if (many) {
key = "many";
}
else {
key = "other";
}
return [key];
};
//# sourceMappingURL=ru.js.map