International Telephone Input with Vue
Ad block will automatically block all calls to common websites that return your IP address information. There should be a fallback that uses globals in the browser to sniff it out. I do something like this: ``` const locale = navigator.language // Step 2: Check if the locale includes the region (country) if (locale.includes('-')) { const iso2CountryCode = locale.split('-')[1].toUpperCase(); return iso2CountryCode; } // Step 3: Fallback to navigator.languages if (navigator.languages && navigator.languages.length > 0) { for (const lang of navigator.languages) { if (lang.includes('-')) { const iso2CountryCode = lang.split('-')[1].toUpperCase(); return iso2CountryCode; } } } ``` Also there's no way to pass a default value for when the IP api call fails which is frustrating.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by johnnyshankman and has received 0 comments.