gettext-plurals

1.0.1 • Public • Published

gettext-plurals Build Status

This is an excerpt of node-gettext's plural forms. Only Polish language is supported.

Installation

npm i --save gettext-plurals

Example 1

const pl = require('gettext-plurals').pl;

const cats = ['kot', 'koty', 'kotów'];

cats[pl(23)]; // 'koty' 

Example 2

import { pl } from 'gettext-plurals';

const cats = ['kot', 'koty', 'kotów'];

export default function ({ count }) {
    return <div> Mam { count } { cats[pl(count)] } </div>;
}

Credits

https://github.com/alexanderwallin/node-gettext/blob/master/lib/plurals.js

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i gettext-plurals

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • michal.jezierski