0.0.11 • Published 3 years ago

@mpkelly/react-i18n v0.0.11

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

react-i18n

An tiny i18n library for React JS. It makes use of the Context API to support a hierarchy of language bundles (each of which can be loaded on demand) and the native Intl package to provide some formatting utilities for common things like dates and currencies. You can easily include anything else as and when you need to.

A tiny bundle size is nice but makes this library also makes it easy for you to distribute your language text across many files and is setup for code splitting and dynamic imports. This is illustrated by the exmaple project which is hosted here.

Compare on Bundlephobia

Install

npm i @mpkelly/react-i18n

Demos

Features

  • Tiny, treeshakable bundle - 1.4kB gzipped
  • Clean code. No special components that take over your code base
  • Hierarchical with support for dynamic imports and code splitting
  • Extensible/customizable Markdown support: converts text values into ReactNode array
  • Supports dates, currencies and pluralization via native Intl package
  • Extend your design system components easily using withI18N() HOC
  • Includes React hook useI18N
  • Docs
  • Tests

Quick Start

API

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago