const longLanguageNames = new Intl.DisplayNames(['en'], { type: 'language' });
console.log(longLanguageNames.of('en-US'));
const shortLanguageNames = new Intl.DisplayNames(['en'], { type: 'language', style: 'short' });
console.log(shortLanguageNames.of('en-US'));
const narrowLanguageNames = new Intl.DisplayNames(['en'], { type: 'language', style: 'narrow' });
console.log(narrowLanguageNames.of('en-US'));
/*
run:
"American English"
"US English"
"US English"
*/