/eo-locale

🌏Internationalize React and Preact apps 👔Elegant lightweight(1.8kB) library based on Internationalization API

Primary LanguageTypeScriptMIT LicenseMIT

build status

  • 💪Runs in all browsers and Node.js
  • ☎Can be used not only in React.Component but also in Vanilla JS
  • 📦Really tiny size. Calculated by size-limit and bundlephopia.
  • 📚Message format is strictly implemented by ICU standards
  • 🎓Support for 150+ languages
  • 🎉Support HTML in message. Support React Elements as variables
  • 🎢Locale data in nested JSON format are supported
  • 👫Simple. Only four components and one hook
  • ⚙️TtypeScript and Flow types out of the box. Library has written on TypeScript
  • 🎄Optimized for tree shaking

Motivation

Internationalization is the process of adapting an application to work with different languages and regions. That can bring some benefits. Your target group can be broader than the one with the default language of the app. So by internationalizing an app, you may reach a bigger audience.

Internationalization it's not only about translation text. Users expect localized Dates, Number separators, Currencies.

Compare with most popular libraries

react-intl react-i18next @eo-locale/react
13.5kB 5.3kB 1.9kB

eo-locale inspired by react-intl. react-intl is really cool library with convenient api, but weight is too much. You can check actual information about weights on bundlephobia.

Projects using eo-locale