GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How do I make a pop-up warning page matched to the language of the country? (https://gfy.com/showthread.php?t=940057)

Darrell 11-24-2009 03:42 AM

How do I make a pop-up warning page matched to the language of the country?
 
I've searched everywhere on how to do this with no success and am hoping someone here will be able to help me :)

I want a pop-up warning page to appear when someone enters a site matched to the language of their country. Any ideas how I do that?

v4 media 11-24-2009 03:43 AM

would it not be easier to do it matched to the browser lang?

Darrell 11-24-2009 03:54 AM

Quote:

Originally Posted by v4 media (Post 16579733)
would it not be easier to do it matched to the browser lang?

I hadn't thought of that :upsidedow Can you give me any help on where I can find out how to do that?

v4 media 11-24-2009 04:23 AM

Quote:

Originally Posted by Darrell (Post 16579766)
I hadn't thought of that :upsidedow Can you give me any help on where I can find out how to do that?

Sorry not a programmer, but I don't think it's difficult, can probably be done with htaccess

grumpy 11-24-2009 04:47 AM

Code:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage;
if (language.indexOf('en') > -1) document.location.href = 'english.html';
else if (language.indexOf('de') > -1) document.location.href = 'german.html';
else if (language.indexOf('it') > -1) document.location.href = 'italian.html';
else
document.location.href = 'defaultpage.html';
// End -->
</script>


some java for you

Darrell 11-24-2009 06:30 AM

Quote:

Originally Posted by grumpy (Post 16579897)
Code:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage;
if (language.indexOf('en') > -1) document.location.href = 'english.html';
else if (language.indexOf('de') > -1) document.location.href = 'german.html';
else if (language.indexOf('it') > -1) document.location.href = 'italian.html';
else
document.location.href = 'defaultpage.html';
// End -->
</script>


some java for you

Thanks I'll try that out :thumbsup

Iron Fist 11-24-2009 07:00 AM

Nice code :)

AIbenjamink 11-24-2009 07:18 AM

You would probably want to use a server side language in case your visitor has javascript disabled.:2 cents:

Darrell 11-24-2009 01:06 PM

Quote:

Originally Posted by AIbenjamink (Post 16580240)
You would probably want to use a server side language in case your visitor has javascript disabled.:2 cents:

Good idea. Thanks.


All times are GMT -7. The time now is 05:39 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123