filmov
tv
Internationalization in JavaScript with NodeJS
![preview_player](https://i.ytimg.com/vi/CI-gJPq29v0/maxresdefault.jpg)
Показать описание
Tutorial showing how to use the Intl JS API in NodeJS (i18n). We'll install a module to unlock the Intl API languages for Node and test out RelativeTimeFormat to translate and localise relative times in JavaScript. I'll tell you how to get started with the built-in internationalization library in JS for Node 12 and higher. We'll change the locale to see how the translation works and test different BCP 47 language tags.
Internationalization is a difficult undertaking but using the Intl API is an easy way to get started, it's great to see this new API in the JS language and available for use. Soon, you'll be able to have confidence using it in the browser as modern browsers support the major Intl features. Have a look at the browser compatibility charts to see which browsers and versions of node are supported.
Use Intl.RelativeTimeFormat for language-sensitive relative time formatting.
#javascript #nodejs #webdevelopment
MDN Documentation:
Full ICU NPM package:
---
🐦 Follow me on twitter:
📝 Read my blog:
👨💻Join me on the DEV community:
📰 Read my articles on Medium:
🐙 See my public code on GitHub:
---
If you have any suggestions for new tutorials, leave a comment or tweet me.
---
Subscribe to my channel for more tutorials helping you to craft cool user interfaces on the web with all the tools which are available from JavaScript, CSS and HTML to specific web APIs. I cover Framer Motion and React libraries in-depth so you can learn how to achieve animations on the web and build more intuitive web apps.
Internationalization is a difficult undertaking but using the Intl API is an easy way to get started, it's great to see this new API in the JS language and available for use. Soon, you'll be able to have confidence using it in the browser as modern browsers support the major Intl features. Have a look at the browser compatibility charts to see which browsers and versions of node are supported.
Use Intl.RelativeTimeFormat for language-sensitive relative time formatting.
#javascript #nodejs #webdevelopment
MDN Documentation:
Full ICU NPM package:
---
🐦 Follow me on twitter:
📝 Read my blog:
👨💻Join me on the DEV community:
📰 Read my articles on Medium:
🐙 See my public code on GitHub:
---
If you have any suggestions for new tutorials, leave a comment or tweet me.
---
Subscribe to my channel for more tutorials helping you to craft cool user interfaces on the web with all the tools which are available from JavaScript, CSS and HTML to specific web APIs. I cover Framer Motion and React libraries in-depth so you can learn how to achieve animations on the web and build more intuitive web apps.
Комментарии