0.0.3 • Published 4 years ago

@codetain/translations v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

translations

NPM version NPM downloads MIT License

i18n-compatible package with common translations that can be used in your applications right away.

Installation

npm install @codetain/translations

or

yarn add @codetain/translations

Usage

You can simply import translations to your project and mix them with your current translations. When you use i18next you can pass it to resources like this:

import { en, de } from '@codetain/translations';

const resources = {
  en: {
    translation: { ...en, ...yourTranslationsEN }
  },
  de: {
    translation: { ...de, ...yourTranslationsDE }
  }
};

i18n
  .use(initReactI18next)
  .init({
    resources
  });