5 JavaScript internationalization libraries that look interesting
I'm JS developer with 13 years of professional experience. I'm always happy to teach my craft.
Search for a command to run...
I'm JS developer with 13 years of professional experience. I'm always happy to teach my craft.
No comments yet. Be the first to comment.
I’ve been working in programming for the last 16 years. Let’s see what changes I see in our industry that are enabled by generative AI. Rapid prototyping The last few months, I’ve been working on a set of WordPress plugins, related to event organizat...
Writing unit tests takes time and effort. Nonetheless, many teams insist on writing them anyway—that’s because of the benefits they bring to a project. Those benefits are mainly the following: fast feedback—unit tests speed up each iteration of twea...

Pure functions are the perfect case for unit testing. For a given input, we always expect the same output—there is no internal state involved. Let’s take a look at a few examples and some simple tests that check if the methods work as expected. Jasmi...

Let’s say you have a job interview in a few days. How should you prepare for it so that you can make an informed decision about joining the company, as well as make sure that your interests are taken care of? Prepare your questions An interview is a ...

Creating example projects is a common way of showing your skills to potential employers. Let’s take a look at what’s important to keep in mind when building personal projects with an eye toward impressing prospective employers. Simplicity Building ap...

I've been in angular(.js) bubble for a pretty long time. During this, I was happily using some framework-specific tools for managing translations - mostly angular-translate. Unfortunately, those tools are limited to the framework and don't help in another context.
What I liked about the setup I had so far:
t('abstract_keys') over t('The source language message'), as it takes less space in the codeOn top of that, now I want framework independent solution. Internationalization (i18n) is a problem complex enough to have some serious thinking invested in it, and it's completely unrelated to problems solved by JS frameworks.
I did a quick search to see what's out there. Some libraries seemed very suspicious just by the look by the websites; others failed to point towards covering points I listed above.
i18next looks the most impressive - it looks more like a translation ecosystem than just an i18n library. I would need to experiment with it a bit to really tell how well it delivers its promises, but definitively it is at least trying to address all my considerations.
A library from Airbnb - they do well with i18n, so it's worth taking a look.
At least the documentation looks like from the current decade. It can be worth checking.
A solution that tries to cover all possible edge cases of applying genders, complex plurals for languages with less straightforward grammar - for example, Polish.
A general purpose internationalization library in 292 bytes
I want to see it in action! And how far you can get with such a minimalistic solution.
What are your thoughts about i18n in JS? Any library you would recommend me to add or remove from my list?