GithubHelp home page GithubHelp logo

trendingtechnology / text-localizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from enzomanuelmangano/text-localizer

0.0 2.0 0.0 2.7 MB

A lightweight, fast and flexible way to handle localized strings

Home Page: https://enzomanuelmangano.github.io/text-localizer/

TypeScript 79.47% JavaScript 10.72% Shell 0.62% Kotlin 2.74% Objective-C 1.05% Ruby 1.40% CSS 3.99%

text-localizer's Introduction

๐Ÿ“– 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

text-localizer's People

Contributors

enzomanuelmangano avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.