DEV Community

Cover image for Don't use i18next ❌😒

Don't use i18next ❌😒

Nevo David on September 30, 2024

According to npmjs.com statistics, i18next is the most popular internationalization library for React. This is probably due to the right choice of...
Collapse
 
masudalimrancasual profile image
Masud Al Imran β€’ β€’ Edited

Almost every project I have worked on I implemented internationalization myself, I don't find any significant benefit using i18next that I can't implement myself pretty easily. I think trying to use plugins for every small functions are overkill.
P.S. I also don't like using autocomplete/ search bar plugins. I insist on making one up myself.

Collapse
 
henrywills22 profile image
Henry Willz β€’

interesting... do you always get your projects translated just in the json files without any external tool?

Collapse
 
elsyng profile image
Ellis β€’

AgreedπŸ‘

Collapse
 
nevodavid profile image
Nevo David β€’

I think it all comes down to the amount of languages and amount of translations you need

Collapse
 
tswistak profile image
Tomasz Świstak β€’ β€’ Edited

How do you handle different pluralization rules across different languages? For me, having it is a main benefit for using i18n libraries. English is pretty simple with just one plural form, but many languages use different forms depending on quantity. Also, as a user of such language, I really dislike seeing that translators couldn't use proper plural form and used all at once or a random one.

Collapse
 
jancizmar profile image
Jan Cizmar β€’

Exactly <3

Collapse
 
marcus_hoang profile image
KhΓ‘nh HoΓ ng (Marcus) β€’ β€’ Edited

Totally agreed

Collapse
 
claraq profile image
Clara Quintela β€’

Me too.

Collapse
 
martinbaun profile image
Martin Baun β€’

Agreed. Tolgee does it perfectly.

Collapse
 
dane_stevens profile image
Dane Stevens β€’

You can one-click install Tolgee on Railway.app to easily host your own Tolgee instance:
railway.app/template/gpEPyD?referr...

Collapse
 
nevodavid profile image
Nevo David β€’

Awesome!

Collapse
 
henryjohn21 profile image
henryjohn21 β€’

Looks cool, thanks!

Collapse
 
nevodavid profile image
Nevo David β€’

Yas!

Collapse
 
keogh profile image
Isaac Zepeda β€’

oh no I already started using it, I gotta say I had some hard time with it

Collapse
 
nevodavid profile image
Nevo David β€’

Oh, what was the problem?

Collapse
 
keogh profile image
Isaac Zepeda β€’

I'm still not able to make it read the spanish translations file in production, I have all the variables set correctly just loading the english file for some reason. Also I add to implement my own middleware for a telegram bot, I mean at the end almost everything I solvable, it just it wasn't as smooth as the documentation says.

Also the documentation was a little overwheelming

Collapse
 
best_codes profile image
Best Codes β€’

I've tried Tolgee, and it's pretty nice, but I honestly preferred Crowdin translate over it.

Collapse
 
nevodavid profile image
Nevo David β€’

Why?

Collapse
 
best_codes profile image
Best Codes β€’

The Crowdin setup was more intuitive for me. It was easier to integrate with my GitHub account to auto translate my apps and stuff. Plus, you can AI translate in bulk (then review, of course), which helped me translate Codequill all in one day. :D

Thread Thread
 
smithjohn21 profile image
smithjohn21 β€’

Tolgee has the batch translation feature now. AFAIK it was added like year ago or something.

Thread Thread
 
best_codes profile image
Best Codes β€’

Does it have OpenAI integration for it?

Thread Thread
 
jancizmar profile image
Jan Cizmar β€’

Hey! Tolgee has something called Tolgee AI translator, which is based on OpenAI. In comparison to legacy translators like Google Translate or DeepL, it uses much more data. tolgee.io/platform/translation_pro...

Thread Thread
 
best_codes profile image
Best Codes β€’

With Crowdin I can already use my own custom AI API endpoints and tokens, or OpenAI, Google, etc. with any custom models I want. :)

Thread Thread
 
jancizmar profile image
Jan Cizmar β€’

This is indeed something, we should think of.

Collapse
 
devnenyasha profile image
Melody Mbewe β€’

Great reads @nevodavid. Thanks for the insights

Collapse
 
brooks-123 profile image
Brook β€’

I used i18next for a project at work then we migrated to lingui, but Tolgee looks interesting.

Collapse
 
nevodavid profile image
Nevo David β€’

You should try it out πŸš€

Collapse
 
kamran2121 profile image
kamran2121 β€’

we exactly got to this issue when storing arrays in i18next data

Collapse
 
nevodavid profile image
Nevo David β€’

Time to move to Tolgee :)

Collapse
 
steven0121 profile image
Steven β€’

Thanks for the insights!

Collapse
 
nevodavid profile image
Nevo David β€’

You are welcome :)

Collapse
 
adrai profile image
Adriano Raiano β€’

You're content does not really reflect the truth about i18next...
Just a couple of points:

  • i18next doesn't use the ICU message format

    • (by default), but you can use the ICU message format simply by adding the i18next-icu module
    • the default json format was used (instead of the icu) because of it's history and because it is/was simpler
  • I18next was created by developers with no localization experience.

    • that's not true... but it was created by developers with developer's focus
  • the most problematic is the support for returning arrays and objects from localization data.

    • it's just an extra features, which comes really handy for certain use cases, nobody forces you to use this
  • ...Other features that just cause a mess and can be omitted, like list formatting or selecting by context, are not trivial to support for the platforms.

    • locize proofs that there is no problem by offering all i18next format features...
Collapse
 
jobenjada profile image
Johannes β€’

we were planning to use next-intl - any objections?

Collapse
 
jancizmar profile image
Jan Cizmar β€’ β€’ Edited

As a Tolgee creator, I would recommend you Tolgee. 🀠 We are actually using next-intl for some part of Next integration. :)

tolgee.io/js-sdk/integrations/reac...

Collapse
 
jobenjada profile image
Johannes β€’

why tho? Sell it to me :D

Collapse
 
romkor profile image
Roman β€’

Sounds like competitors ad

Collapse
 
servicehumorist407 profile image
Andrew β€’

What do you think of: formatjs.io/docs/intl/ ?
We are using it and it works well.

Collapse
 
nevodavid profile image
Nevo David β€’

It's good :)
But it stateless, it means that you can only translate through code

Collapse
 
jancizmar profile image
Jan Cizmar β€’

btw. Tolgee JS uses the ICU MessageFormat implementation provided by FormatJS, which depends on the intl classes.