1.0.4 • Published 2 years ago

tiny-i18next v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

i18n

This is a tiny and simple class for i18n translations. It supports placeholders and various plurals. It requires a modern browser or node 16.x or greater

Installation

Use npm, pnpm or yarn to install it.

pnpm add tiny-i18next

Use

import I18next from 'tiny-i18next';
const enTranslations = {
  "cancel": "Cancel",
  "checkout": "Checkout",
  "modal_body": "This is the modal body",
  "open": "Open",
  "title": "Find"
}

const t = new I18next(enTranslations)

const t = new I18next({ name: "George" });
const userName = t('name') // George

See src/test/I18next.spec.ts for other examples

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago