Skip to content

TrendingTechnology/text-localizer

 
 

Repository files navigation

📖 Text Localizer

A lightweight, fast and flexible way to handle localized strings.

Documentation can be found here.

Package Versions

Name Latest Version
text-localizer badge
react-text-localizer badge
react-native-text-localizer badge

Motivation

Text Localizer is a package born out of the need to manage translations in a typesafe manner. Currently, the best-known solutions in javascript for managing translations are based on a key-value approach (i18n.js, i18next).

This approach involves this way of accessing the individual translation.

console.log(translationsObject.get('translations_key'));

The main problems with this approach are that:

  • There is no effective compile-time support to catch errors if the key is wrong;
  • There is no way of knowing whether the key being accessed is set for all languages;
  • There is no warning if you try to access an unsupported locale;
  • The refactoring of translation keys can easily lead to problems that cannot be intercepted at compile-time.

Consequently, the goal of TextLocalizer is to provide a lightweight, fast, and flexible way to access translation strings in a type-safe manner in the JavaScript world.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

About

A lightweight, fast and flexible way to handle localized strings

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 79.5%
  • JavaScript 10.7%
  • CSS 4.0%
  • Kotlin 2.7%
  • Ruby 1.4%
  • Objective-C 1.1%
  • Shell 0.6%