<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Server Side Language Detection with Google Language API</title>
	<atom:link href="http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/</link>
	<description>Life at Accenture</description>
	<lastBuildDate>Sun, 06 Nov 2011 05:31:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: john</title>
		<link>http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/comment-page-1/#comment-1426</link>
		<dc:creator>john</dc:creator>
		<pubDate>Mon, 17 Oct 2011 10:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/#comment-1426</guid>
		<description>Hi Samuel,
Your function is working good except few languages that it doesn&#039;t support(ar,ru and few more)
Do you have an idea why is that?
Thanks both of you for this feature, it will help me allot.</description>
		<content:encoded><![CDATA[<p>Hi Samuel,<br />
Your function is working good except few languages that it doesn&#8217;t support(ar,ru and few more)<br />
Do you have an idea why is that?<br />
Thanks both of you for this feature, it will help me allot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajith</title>
		<link>http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/comment-page-1/#comment-1182</link>
		<dc:creator>Ajith</dc:creator>
		<pubDate>Wed, 24 Aug 2011 08:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/#comment-1182</guid>
		<description>Wonderful stuff :-)</description>
		<content:encoded><![CDATA[<p>Wonderful stuff <img src='http://blog.lodeblomme.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Which open libraries exist to do language detection? - Quora</title>
		<link>http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/comment-page-1/#comment-409</link>
		<dc:creator>Which open libraries exist to do language detection? - Quora</dc:creator>
		<pubDate>Tue, 14 Dec 2010 00:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/#comment-409</guid>
		<description>[...] a blog post discussing a sample implementation in PHP:http://blog.lodeblomme.be/2008/0...Insert a dynamic date here&#160;BIU&#160;&#160;&#160;&#160;&#160;@&#160;&#160;&#160;&#160;&#160;Edit [...]</description>
		<content:encoded><![CDATA[<p>[...] a blog post discussing a sample implementation in PHP:http://blog.lodeblomme.be/2008/0&#8230;Insert a dynamic date here&nbsp;BIU&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Edit [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russ</title>
		<link>http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/comment-page-1/#comment-305</link>
		<dc:creator>Russ</dc:creator>
		<pubDate>Mon, 06 Sep 2010 21:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/#comment-305</guid>
		<description>Have you tried this serverside recently?  I just tried it and got a json message &quot;Suspected Terms of Service Abuse&quot;.  If I really wanted to &quot;abuse&quot; this service I guess I could fake all the headers that the jsonp request would do... Would be nice if google provided a way to do this, they do it for their translation service: http://code.google.com/apis/ajaxlanguage/documentation/#fonje</description>
		<content:encoded><![CDATA[<p>Have you tried this serverside recently?  I just tried it and got a json message &#8220;Suspected Terms of Service Abuse&#8221;.  If I really wanted to &#8220;abuse&#8221; this service I guess I could fake all the headers that the jsonp request would do&#8230; Would be nice if google provided a way to do this, they do it for their translation service: <a href="http://code.google.com/apis/ajaxlanguage/documentation/#fonje" rel="nofollow">http://code.google.com/apis/ajaxlanguage/documentation/#fonje</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel</title>
		<link>http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/comment-page-1/#comment-261</link>
		<dc:creator>Samuel</dc:creator>
		<pubDate>Thu, 05 Aug 2010 17:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/#comment-261</guid>
		<description>Thanks a lot, Lode. This still works like a charm.

I changed the code, so there is no need for Zend Framework:
&lt;code&gt;function detect_language($text)
{
	/* NOTE: Google is currently using version 1.0.
           If this changes in the future, change the value of this
           variable. Otherwise the URL will not work anymore. */
	$version = &#039;1.0&#039;;
	$url = &#039;http://www.google.com/uds/GlangDetect?v=&#039;.$version.
               &#039;&amp;q=&#039;.urlencode($text);
	
	/* Get the (multidimensional) associative array from the JSON
	   NOTE: json_decode() requires PHP &gt;= 5.2.0 */
	$response = json_decode(file_get_contents($url), true);
	
	if ($response[&#039;responseStatus&#039;] == 200)
		return $response[&#039;responseData&#039;][&#039;language&#039;];
	else
		return false;
}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks a lot, Lode. This still works like a charm.</p>
<p>I changed the code, so there is no need for Zend Framework:<br />
<code>function detect_language($text)<br />
{<br />
	/* NOTE: Google is currently using version 1.0.<br />
           If this changes in the future, change the value of this<br />
           variable. Otherwise the URL will not work anymore. */<br />
	$version = '1.0';<br />
	$url = 'http://www.google.com/uds/GlangDetect?v='.$version.<br />
               '&amp;q='.urlencode($text);</p>
<p>	/* Get the (multidimensional) associative array from the JSON<br />
	   NOTE: json_decode() requires PHP &gt;= 5.2.0 */<br />
	$response = json_decode(file_get_contents($url), true);</p>
<p>	if ($response['responseStatus'] == 200)<br />
		return $response['responseData']['language'];<br />
	else<br />
		return false;<br />
}</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Herman Tolentino</title>
		<link>http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/comment-page-1/#comment-159</link>
		<dc:creator>Herman Tolentino</dc:creator>
		<pubDate>Tue, 06 Oct 2009 01:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/#comment-159</guid>
		<description>Perfect! Thanks for posting this!</description>
		<content:encoded><![CDATA[<p>Perfect! Thanks for posting this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/comment-page-1/#comment-25</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Thu, 13 Nov 2008 00:48:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/#comment-25</guid>
		<description>Wow! Awesome stuff. I was wondering if you have any spare time to help guide me to get this working on my site?

Erik
Chess.com
chessdev[4t}gmail,com</description>
		<content:encoded><![CDATA[<p>Wow! Awesome stuff. I was wondering if you have any spare time to help guide me to get this working on my site?</p>
<p>Erik<br />
Chess.com<br />
chessdev[4t}gmail,com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken Weiner</title>
		<link>http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/comment-page-1/#comment-10</link>
		<dc:creator>Ken Weiner</dc:creator>
		<pubDate>Sun, 20 Apr 2008 08:01:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.lodeblomme.be/2008/03/21/server-side-language-detection-with-google-language-api/#comment-10</guid>
		<description>Thank you so much for posting this!  I have been looking all over for a server-side way of detecting the language of a piece of text.  I am going to try porting your idea to Ruby or Java.</description>
		<content:encoded><![CDATA[<p>Thank you so much for posting this!  I have been looking all over for a server-side way of detecting the language of a piece of text.  I am going to try porting your idea to Ruby or Java.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

