There's another simple way not as precise but it's what I use.
Create a text attribute called "language".
Create another text attribute called "response"
In a vistURL block write this URL:
http://ip-api.com/jsonNow below visitURL set the text attribute "response" (the one you just created) to the vistURL response.
Now below in a code block write this:
var owresponse : Dynamic = haxe.Json.parse(_response);
_language = owresponse.countryCode;
Now you can print the text attribute you created "language"
When you do this you will see the language in a country code format.
So DK meaning Denmark ~ Danish, US ~ English and so on...