Posted by jojo on 07/05/06 23:06
Nospam schrieb:
> I have a few javascripts. I would like to show a certain script based on
> the country ip of the viewer, how would I achieve this? is there html I
> could use to run the javascript based on the country ip?
>
>
Another solution would be to write everything in one script but call
different functions according to the language. The advantage would be
that you can use JS to get the language selected in the browser:
var lang;
if (navigator.browserLanguage) lang=navigator.browserLanguage; //IE
else if (navigator.language) lang=navigator.language; //others
or, shortend:
var lang=(navigator.browserLanguage) ? navigator.browserLanguage :
navigator.language;
Navigation:
[Reply to this message]
|