Skip to content
@i18n-inflect

i18n-inflect

Grammatical inflection and agreement for i18n — articles, case suffixes and particles, across languages

i18n-inflect

Grammatical agreement for localized text — the part printf can't do.

Localized strings constantly need grammar that depends on a value only known at runtime: the right article, the right case suffix, the right particle.

format("hu", "Nyertél ^[a {card}](case: instrumental)!", { card: "kőr ász" });
// → "Nyertél a kőr ásszal!"

format("en", "You drew ^[a {c}](article: indefinite)", { c: "ace" });
// → "You drew an ace"

Try it in your browser →

Projects

Repository What it is
i18n-inflect-js The JavaScript/TypeScript implementation — browser, Node.js and Cordova. Hungarian, English, German, French, Spanish and Korean.

Ports to other languages are welcome as sibling repositories here.

Contributing

The most valuable contributions are new languages and corrections from native speakers. If a form comes out wrong in your language, that is worth an issue even without a fix — see CONTRIBUTING.md.

Popular repositories Loading

  1. i18n-inflect-js i18n-inflect-js Public

    Grammatical inflection and agreement for i18n — articles, case suffixes and particles in 6 languages, for the browser, Node.js and Cordova

    TypeScript 1

  2. .github .github Public

    Organization profile

Repositories

Showing 2 of 2 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…