Formatting text in JS seems easy at first, but as soon as you start to deal with any complex formatting such as numbers, or dates it becomes very difficult. On top of that if you want to translate your application between multiple languages you are looking at even more complexity which is why I love the Intl API. This JS API makes working with formatting and translations so easy and it is one of my favorite JavaScript APIs.


Materials/References:

Intl MDN Documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#constructor_properties
Relative Time Format Article: https://blog.webdevsimplified.com/2020-07/relative-time-format
NumberFormat Video: https://youtube.com/shorts/H-FeuIKvHS4
DateTimeFormat Video: https://youtube.com/shorts/jZUHZDXmQ_A
RelativeTimeFormat Video: https://youtube.com/shorts/Nn-5dTtVqqk


Find Me Here:

My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: https://www.patreon.com/WebDevSimplified
Twitter: https://twitter.com/DevSimplified
Discord: https://discord.gg/7StTjnR
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified


⏱️ Timestamps:

00:00 - Introduction
00:49 - Intl Docs
01:25 - Date Time Format
03:36 - Relative Time Format
05:26 - Number Format
07:56 - Plural Rules


#Intl #WDS #Internationalization