1 Comment

React i18n - Extend react-intl with our own context and markup

I was recently looking for a neat way to make react-intl translations keys more dynamic and our React code less verbose when it comes to passing values.

Fortunately it's quite easy to wrap react-intl to create your own markup language and expose constants that must be reused across keys.

The blog article below summarizes how to do it:

Hope this helps anyone looking to simplify their i18n code :)

  1. 2

    This is a great guide about i18n which helps removing the occasional need for dangerouslySetInnerHTML. Very cool!

Trending on Indie Hackers
10 Free Illustration resources for indie hackers. 11 comments One of the best guides that I come across for SEO 11 comments Dev of 1 built a $4.2M ARR dealership system. AMA. 9 comments Acquisition Channel Trends & Opportunities: Instagram, E-Commerce, Apple 8 comments How Stripe operates like a civilization 7 comments Page 404. Why do we give a F$%k about details in design of our products? 6 comments