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/enUS/d...
Relative Time Format Article: https://blog.webdevsimplified.com/202...
NumberFormat Video: • How To Easily Format Currencies In Ja...
DateTimeFormat Video: • How To Easily Format Dates In JavaScript
RelativeTimeFormat Video: • Intl.RelativeTimeFormat Is A Game Cha...
Find Me Here:
My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
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