node.jscountry-codescountries

Get country main language by country code


Is there a way i can get a country main language by its country code? I need something like countries-list npm package which gives me a list of spoken language codes by a country code. An example of what i mean: 'en' => 'English'


Solution

  • You can use this Rest Api for country : https://restcountries.com/