DEV Community

Cover image for What do I expect from my i18n library
Garrone Joseph
Garrone Joseph

Posted on

What do I expect from my i18n library

  • I want true type-safety, If I forgot something I want to be warned about it at compile time. I want to be guided by intelisence through and through so I can focus on my content.
  • I want to be able to explicitly fallback to English when I can't translate myself.
  • I want it to be easy for non-tech peoples to provide missing translations.
  • I want to be able to use React components and involve JS logic in my translations.
  • I want the language to default to the browser preference.
  • I want the language preferences to be persistant across reloads.
  • SEO: I want to let Google know that my website is available in multiple language.
  • I want all this to work with server side rendering (if I need to).
  • I want to be able to change the language of my app by adding ?lang=xx to the URL without involving my routing library.

I tried to create a library that checks all the boxes, I called it i18nifty.

Image description

Top comments (0)