make-plural
Version:
Unicode CLDR pluralization rules as JavaScript functions
94 lines (92 loc) • 7.54 kB
TypeScript
export type PluralCategory = "zero" | "one" | "two" | "few" | "many" | "other";
export const af: (start: PluralCategory, end: PluralCategory) => "other";
export const ak: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const am: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const an: (start: PluralCategory, end: PluralCategory) => "other";
export const ar: (start: PluralCategory, end: PluralCategory) => "zero" | "few" | "many" | "other";
export const as: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const az: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const be: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "many" | "other";
export const bg: (start: PluralCategory, end: PluralCategory) => "other";
export const bn: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const bs: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "other";
export const ca: (start: PluralCategory, end: PluralCategory) => "other";
export const cs: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "many" | "other";
export const cy: (start: PluralCategory, end: PluralCategory) => "one" | "two" | "few" | "many" | "other";
export const da: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const de: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const el: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const en: (start: PluralCategory, end: PluralCategory) => "other";
export const es: (start: PluralCategory, end: PluralCategory) => "other";
export const et: (start: PluralCategory, end: PluralCategory) => "other";
export const eu: (start: PluralCategory, end: PluralCategory) => "other";
export const fa: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const fi: (start: PluralCategory, end: PluralCategory) => "other";
export const fil: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const fr: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const ga: (start: PluralCategory, end: PluralCategory) => "one" | "two" | "few" | "many" | "other";
export const gl: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const gsw: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const gu: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const he: (start: PluralCategory, end: PluralCategory) => "other";
export const hi: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const hr: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "other";
export const hu: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const hy: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const ia: (start: PluralCategory, end: PluralCategory) => "other";
export const id: (start: PluralCategory, end: PluralCategory) => "other";
export const io: (start: PluralCategory, end: PluralCategory) => "other";
export const is: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const it: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const ja: (start: PluralCategory, end: PluralCategory) => "other";
export const ka: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const kk: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const km: (start: PluralCategory, end: PluralCategory) => "other";
export const kn: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const ko: (start: PluralCategory, end: PluralCategory) => "other";
export const ky: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const lij: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const lo: (start: PluralCategory, end: PluralCategory) => "other";
export const lt: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "many" | "other";
export const lv: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const mk: (start: PluralCategory, end: PluralCategory) => "other";
export const ml: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const mn: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const mr: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const ms: (start: PluralCategory, end: PluralCategory) => "other";
export const my: (start: PluralCategory, end: PluralCategory) => "other";
export const nb: (start: PluralCategory, end: PluralCategory) => "other";
export const ne: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const nl: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const no: (start: PluralCategory, end: PluralCategory) => "other";
export const or: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const pa: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const pcm: (start: PluralCategory, end: PluralCategory) => "other";
export const pl: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "many" | "other";
export const ps: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const pt: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const ro: (start: PluralCategory, end: PluralCategory) => "few" | "other";
export const ru: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "many" | "other";
export const sc: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const scn: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const sd: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const si: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const sk: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "many" | "other";
export const sl: (start: PluralCategory, end: PluralCategory) => "two" | "few" | "other";
export const sq: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const sr: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "other";
export const sv: (start: PluralCategory, end: PluralCategory) => "other";
export const sw: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const ta: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const te: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const th: (start: PluralCategory, end: PluralCategory) => "other";
export const tk: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const tr: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const ug: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const uk: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "many" | "other";
export const ur: (start: PluralCategory, end: PluralCategory) => "other";
export const uz: (start: PluralCategory, end: PluralCategory) => "one" | "other";
export const vi: (start: PluralCategory, end: PluralCategory) => "other";
export const yue: (start: PluralCategory, end: PluralCategory) => "other";
export const zh: (start: PluralCategory, end: PluralCategory) => "other";
export const zu: (start: PluralCategory, end: PluralCategory) => "one" | "other";