Although there may be good reasons to try to map countries (or really specific locations / areas within a country) to languages, it seems that for your purpose, using
Accept-Language HTTP Request Header,
if only one of the elements of the language selection heuristic (along with the country code) can be a simple and safe choice ...
This approach is sometimes erroneous, because the default language (s) associated with the installed installation of the web browser (when the basic user did not find the time to choose the installation package / setting for their preferred natural language). On the other hand, it also provides the best language guide for many expatriates (who install / configure the browser according to their preferred language), even if the geolocation / language association is completely wrong.
In general, this approach should surpass methods based solely on geolocation (and on a look-up table) in many countries, such as Switzerland, Luxembourg ... as well as many megacities speak in New York, Geneva or Miami ...
mjv
source share