Back

Example: Modify country data

Use static getCountryData method to update the data to only show localised country names.

Markup

<input id="phone" type="tel" placeholder="e.g. +1 702 123 4567">

Code

var countryData = $.fn.intlTelInput.getCountryData();
$.each(countryData, function(i, country) {
  country.name = country.name.replace(/.+\((.+)\)/,"$1");
});
$("#phone").intlTelInput();

Result