i18n-ru

i18n plugin for Russian city names

Usage no npm install needed!

<script type="module">
  import i18nRu from 'https://cdn.skypack.dev/i18n-ru';
</script>

README

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