# Detect country and set language? Javascript?

**URL:** <https://forum.kirupa.com/t/detect-country-and-set-language-javascript/302439>\
**Category:** flash\
**Created:** [December 30, 2009, 7:17pm UTC](https://forum.kirupa.com/t/detect-country-and-set-language-javascript/302439 "2009-12-30T19:17:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![heato112](https://avatars.discourse-cdn.com/v4/letter/h/54ee81/32.png) [@heato112](https://forum.kirupa.com/u/heato112)\
**Post date:** [December 30, 2009, 7:17pm UTC](https://forum.kirupa.com/t/detect-country-and-set-language-javascript/302439/1 "2009-12-30T19:17:51Z")

</div>

Hello,

I wanted to set the language of my flash website based on the users location country wise. I know there are some methods with php and searching a database but I am trying to avoid that route.

I found one script in javascript that links to a webpage and produces a document.write if you go to that link. It returns the users country i believe. but there seems to be no documentation.

**\<!–webbot bot=“HTMLMarkup” startspan --\>  
\<script language=“Javascript” src=“[http://map.geoup.com/geoup?template=CountryName](http://map.geoup.com/geoup?template=CountryName)”\>  
\</script\>  
\<!–webbot bot=“HTMLMarkup” endspan --\>**  
Is it possible for me to capture that input from the link and pass it in as a flashvar? I am using as3 and I have no clue how to pass that through. If anyone can provide assistance that would be awesome.
