I have a rails app, with 2 version english and spanish version. Using I18n, what’s the optimal way of determining the user’s location and redirecting to the proper spanish or english version depending on where’s currently based?
Perhaps google map API?
I think most of the users are not have positioning devices in their desktops and laptops so some time getting location using Google Maps API will fail.
best way is using the IP address.Get the user IP address and check which IP pool belongs to and you can determine the country.