Menu

There are countless i18n tools. I built another one anyway.
📰

There are countless i18n tools. I built another one anyway.

DEV Community: react·Raphael·3 days ago
#LkS1Sr9v
#devtoreact#devto#dev#json#language
Reading 0:00
15s threshold

I have a day job as a software engineer at a bank. In the evenings, I build my own things. One of them is ChordPic, a small tool for making guitar chord diagrams. People from all over the world started using it, and at some point I wanted it to speak their language.

I knew exactly what that would mean. At work, I've used the usual i18n libraries in more than one app, and I didn't want to bring any of that into a project I build in my free time.

The part nobody puts in the README

If you've done this, you know the drill. Every piece of text in your app turns into a key. "Create chord chart" becomes t('editor.toolbar.create') . The actual sentence moves to en.json . Then you copy en.json to de.json , fr.json , es.json , and so on, and you get them translated somehow.

And then you keep shipping.

You change a button label, and now eleven files are out of date. You add a feature and forget one key in one language, and someone in Brazil sees editor.toolbar.share_tooltip on their screen.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.