8000 GitHub - mpkelly/react-i18n: A tiny (1.4kb gzipped) yet sophisticated i18n library for React JS. Supports lazy loading, code-splitting, hierarchical language bundles, markdown and more.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A tiny (1.4kb gzipped) yet sophisticated i18n library for React JS. Supports lazy loading, code-splitting, hierarchical language bundles, markdown and more.

License

Notifications You must be signed in to change notification settings

mpkelly/react-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A tiny (1.4kb gzipped) yet sophisticated i18n library for React JS. Supports lazy loading, code-splitting, hierarchical language bundles, markdown and more.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0