There is another possibility that does not need any third-party-apis respectively internet-connection at all.
This answer is based on the point-in-polygon-aglorithm.
You need a country/countries as polygon(s) that consist of lat/lng-points, you can get all lat/lng-points of austria (for instance) by using GGIS-Editor and relevant data (as shapefile) from here or from natural earth (select Admin 0 – Countries) here
- Install GGIS-Editor
- Unpack AUT_adm_shp.zip
- Start GGIS-Editor
- Select Tab: Layer -> Add Layer -> add Vectorlayer
Select AUT_adm0.shp (shapefile), it shoudl look like this now:

Mark whole polygon via Mark-Tools (yellow button with cursor):

Select Tab: Layer -> Save as
- Save as GeoJSON-File
Copy all lng/lat coordinates out of this GeoJSON-File:

When you have copied all Lng/Lat-Points as Array-elements in this format:
[ [ lng, lat ], .....]
Then you can use my fiddle-code:
var countryLngLatsOfAustria = [ [ lng, lat ], .....];
function pointInPoly(verties, testx, testy) {
var i,
j,
c = 0,
nvert = verties.length;
for (i = 0, j = nvert - 1; i < nvert; j = i++) {
if (((verties[i][0] > testy) != (verties[j][0] > testy)) && (testx < (verties[j][1] - verties[i][1]) * (testy - verties[i][0]) / (verties[j][0] - verties[i][0]) + verties[i][1]))
c = !c;
}
return c;
}
// use current location
navigator.geolocation.getCurrentPosition(
function (position) {
alert(position.coords.longitude +", "+ position.coords.latitude);
var isInAustria = pointInPoly(countryLngLatsOfAustria, position.coords.latitude, position.coords.longitude);
if (isInAustria) alert('User is located within austria!');
else alert('User is located outside from austria!');
},
function (err) {
console.log(err);
},
{
timeout: 5000,
enableHighAccuracy: true
}
);
(Link: https://jsfiddle.net/pfa028n8) to find out whether you are located in- or outside of austria. Of course it also works with other countries or "combined countries" to find out whether an user is within europe for instance.
Hope this helps.