| 
		
			
			
				
			
			
				 
			
			
				
			
		 | 
		
			
			
				 
			
				
			
		 | 
	||||
| 
				Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.  You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us.  | 
		
		 
		![]()  | 
	
		
			
  | 	
	
	
		
		|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
| 
		 | 
	Thread Tools | 
| 
			
			 | 
		#1 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2007 
				
				
				
					Posts: 399
				 
				
				
				
				 | 
	
	
	
	
		
			
			 
				
				Automatic translation of pages that recognise IP locations
			 
			I am throwing this out there, but is there such a service that translates your web pages automatically for you when a surfer logs on from a different country?  
		
	
		
		
		
		
		
	
	For example the type of thing google has, it recognizes where the user is from throws them to the french site http://www.google.fr and the google page is in French. Can this type of thing be done or does everything have to be translated manually?  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Confirmed User 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Feb 2004 
				Location: Vancouver 
				
				
					Posts: 1,821
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 not sure of a service, but you could do it in php with smarty and lang files using that it would auto transalte on whatever variable you so desired. 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	I could give two shits wether you read this sig or not.  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Oct 2003 
				Location: Atlanta 
				
				
					Posts: 2,840
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 but what if an english reading person is traveling overseas or military person is viewing the page outside of the of the country he's from.  
		
	
		
		
		
		
		
	
	i guess it would work for majority of the viewers.  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Totally Borked 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Feb 2005 
				
				
				
					Posts: 6,284
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 IMO you should never present language-localised pages based on IP address, but based on the browser language settings. I'm in France, but I prefer to read English, so I set my browsers to default to En-en. 
		
	
		
		
		
		
			Web pages should respect my choice and not diss up French pages based on my IP address location. 
				__________________ 
		
		
		
		
	
	![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Workin With The Devil 
			
		
			
			
			Industry Role:  
				Join Date: Oct 2004 
				Location: West Bloomfield, MI 
				
				
					Posts: 51,532
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 you should never translate by ip, you should translate based on the surfers language setting in there browser 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2007 
				
				
				
					Posts: 399
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Thanks for the advice regarding browser settings. To clarify however, this can be done automatically and I don't need to go through my pages with a translator having to do each and everyone of them popping them on a new page? 
		
	
		
		
		
		
		
	
	Are there any pages on how to set this up? I would not really know what to look for.  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2007 
				
				
				
					Posts: 399
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 If someone could quickly help out old franck  
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 ►SouthOfHeaven 
			
		
			
				
			
			
			Join Date: Jun 2004 
				Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer 
				
				
					Posts: 28,609
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 What i would do is log your visitors languages and get an idea of the top languages , then work on getting some "real" translations for the major ones 
		
	
		
		
		
		
			make a file called languagelog.txt upload to root , chmod then drop this pgp into your index, this will log the different languages. Code: 
	<?php
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
$fh2 = fopen("languagelog.txt", 'a+');
fwrite($fh2, "$lang\n");
fclose($fh2);
?>
Could be as simple as a welcome message if ($lang == "en"){ $welcomemessage = "Welcome to my site";} if ($lang == "fr"){ $welcomemessage = "Bonjour tete a la merde";} 
				__________________ 
		
		
		
		
	
	hatisblack at yahoo.com  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 ►SouthOfHeaven 
			
		
			
				
			
			
			Join Date: Jun 2004 
				Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer 
				
				
					Posts: 28,609
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 another idea is just to redirect certain languages to an online translator like babelfish that translates the page you're on 
		
	
		
		
		
		
			Code: 
	
<?php
$mypage = "www.gfy.com/index.php";
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
if ($lang == "de"){
$url = "http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2F$mypage&lp=en_$lang&btnTrUrl=Translate";
header("Location: $url");
exit;
}
?>
				__________________ 
		
		
		
		
		
			
		
		
	
	hatisblack at yahoo.com  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 ►SouthOfHeaven 
			
		
			
				
			
			
			Join Date: Jun 2004 
				Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer 
				
				
					Posts: 28,609
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 what i would do is simply translate the words "translate this page" then put a link near the top that leads to an online translation service like babelfish. 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	hatisblack at yahoo.com  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 ►SouthOfHeaven 
			
		
			
				
			
			
			Join Date: Jun 2004 
				Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer 
				
				
					Posts: 28,609
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 something like this  
		
	
		
		
		
		
			Code: 
	<?php
$mypage = "www.gfy.com/index.php";
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
$url = "http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2F$mypage&lp=en_$lang&btnTrUrl=Translate";
if ($lang == "fr"){
$message = "Translate this page <- this should be in french";
}
if ($lang == "de"){
$message = "Translate this page <- this should be in german";
}
$translatelink = "<a href=\"$url\">$message</a>";
echo $translatelink;
?>
				__________________ 
		
		
		
		
	
	hatisblack at yahoo.com  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#13 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2007 
				
				
				
					Posts: 399
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Thankyou Smokey for your help.  
		
	
		
		
		
		
		
	
	I like the idea of real translations for visitors from the major countries who visit me site. For the other countries though, what method would be best for my translated pages to appear based on their browser settings automatically and a page of mine created for that langauge. E.g. the page is mysite.com/porn.html And someone from Poland logs on with polish settings in his browser. I would then want a page created for him in polish that is under the url mysite.com/porn.html&pl I am not sure whether that is the second or third method you posted and whether the online services allow this.  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#14 | 
| 
			
			
			
			 DM at Performive.com 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Aug 2006 
				Location: Atlanta, G.A. 
				
				
					Posts: 2,968
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Smokey hits nail on head!  
		
	
		
		
		
		
			
		
		
		
		
	
	Hey Smokey. When ever you have a chance can you hit me up. Would like to discuss a few things with with regards to this. See sig. Clean Frank. If you're looking to translate into different languages let me know. We would be more than happy to help.  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#15 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2007 
				
				
				
					Posts: 399
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Hey for the moment I would like to just get automatic setup. Once I have some spare cash then I can go down the proper route. But just need to know how to go about it. 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#16 | |
| 
			
			
			
			 ►SouthOfHeaven 
			
		
			
				
			
			
			Join Date: Jun 2004 
				Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer 
				
				
					Posts: 28,609
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 It grabs an glob of text like a welcome message from a txt file en.txt for english fr.txt for french etc etc if you dont have a txt file for that language it displays a link to translate the page in place of where the message would be ( KEEP IN MIND THE WORDS "TRANSLATE THIS PAGE" ARE IN ENGLISH ) Code: 
	<?php
$pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
$pageURL = urlencode($pageURL);
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
$lang = strtolower($lang);
$file="$lang.txt";
if (file_exists($file)) {
$message = file_get_contents("$file");
} else {
$message = "<a href=\"http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=$pageURL&lp=en_$lang&btnTrUrl=Translate\">TRANSLATE THIS PAGE</a>";
}
echo $message;
?>
using this method you could add a txt file message for each language as you add them without altering those code. the drawback is they must be able to read the words "translate this page" in english to understand they can translate the page. ------------------------------------------------ below is some diff code , this will automatically redirect the user to the babelfish translator if you dont have a message .txt for that language Code: 
	<?php
$pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
$pageURL = urlencode($pageURL);
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
$lang = strtolower($lang);
$file="$lang.txt";
if (file_exists($file)) {
$message = file_get_contents("$file");
} else {
$message = "<script>top.location.href = \"http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=$pageURL&lp=en_$lang&btnTrUrl=Translate\";</script>";
}
echo $message;
?>
so for example on gfy where it says "where the industry meets" if you put this code right where it says that then made a txt file called en.txt for english and put "where the industry meets" then made a few more with proper translation for popular languages , if someone visited this page they would see the messagein their language, unless gfy didnt have their particular language translated then it would send them to the babelfish translator below is an example of the babelfish page translator.. translating gfy.com to french http://babelfish.yahoo.com/translate...rUrl=Translate 
				__________________ 
		
		
		
		
	
	hatisblack at yahoo.com  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#17 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2007 
				
				
				
					Posts: 399
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Thanks very much Smokey, Will get on this right now 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 |