1.0.4 • Published 5 years ago

i18n-ru v1.0.4

Weekly downloads
14
License
MIT
Repository
github
Last release
5 years ago

i18n-ru

i18n-ru is a js plugin for internationalization of nouns in Russian language.

Installation

Use the package manager npm to install i18n-ru.

npm i -D i18n-ru

Usage

import toDeclension from 'i18n-ru';

toDeclention is a function that takes two arguments: case(string) and word(string) and return declentioned word.

Cases supported: 'vinit' and 'genitive'.

Example

toDeclension('vinit', 'Верхняя Пышма'); // Верхнюю Пышму
toDeclension('genitive', 'Верхняя Пышма'); // Верхней Пышмы

React Example

  render() {
    return (
        <p>{toDeclension('genitive', 'Верхняя Пышма')}</p>
    );
  }

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Repository

Github

License

MIT