Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

343
Vistas
Get country name from ISO code in Javascript

Having the list of country ISO codes, they are available here for reference:

Is there a way to return the country name from it?

Like, having a function, getCountryName(), which if called getCountryName('AL') will return 'Albania' and so on.

I was doing it as saving the whole list and work on it as with a dictionary but I was wondering if there is a method without saving the whole countries into a list.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You can try Intl.DisplayNames() of ECMAScript Internationalization API Intl:

var getCountryNames = new Intl.DisplayNames(['en'], {type: 'region'});
console.log(getCountryNames.of('AL'));  // "Albania"

about 4 years ago · Juan Pablo Isaza Denunciar

0

Hei you could use the JSON version of what you need, here https://pkgstore.datahub.io/core/country-list/data_json/data/8c458f2d15d9f2119654b29ede6e45b8/data_json.json

then, with a forach, you loop over the file, with your ISO code, and when you find it, you ask your script to return the state name

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda