Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Language name from ISO 639-1 code in Javascript without wasting too much if your time.
The question is published on by Tutorial Guruji team.
The question is published on by Tutorial Guruji team.
I’m building a website where people can associate a language information to content.
The website uses Javascript heavily and the language information associated to various elements is treated internally as an ISO 639-1 code.
How to show a list of language names – in the language of the user ?
Answer
There is a native support for this in the new(ish) Intl API:
let languageNames = new Intl.DisplayNames(['en'], {type: 'language'}); languageNames.of('fr'); // "French" languageNames.of('de'); // "German" languageNames.of('fr-CA'); // "Canadian French"
We are here to answer your question about Language name from ISO 639-1 code in Javascript - If you find the proper solution, please don't forgot to share this with your team members.