<?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: Language JSONP Service</title>
	<atom:link href="http://ajaxian.com/archives/language-jsonp-service/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/language-jsonp-service</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: lisbakke</title>
		<link>http://ajaxian.com/archives/language-jsonp-service/comment-page-1#comment-268571</link>
		<dc:creator>lisbakke</dc:creator>
		<pubDate>Thu, 30 Oct 2008 18:22:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4928#comment-268571</guid>
		<description>@westonruter
BTW, before creating this API I was digging around for hacks to find the language and one of the things I was hoping for was exactly what you said:
getRequestHeader() / getAllRequestHeaders()</description>
		<content:encoded><![CDATA[<p>@westonruter<br />
BTW, before creating this API I was digging around for hacks to find the language and one of the things I was hoping for was exactly what you said:<br />
getRequestHeader() / getAllRequestHeaders()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lisbakke</title>
		<link>http://ajaxian.com/archives/language-jsonp-service/comment-page-1#comment-268570</link>
		<dc:creator>lisbakke</dc:creator>
		<pubDate>Thu, 30 Oct 2008 18:20:24 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4928#comment-268570</guid>
		<description>@westonruter
I couldn&#039;t agree more.  I created it because of the complete deficiency in client-side language detection which should be functional.

@kriszyp
There are a few properties that can tell you the language in the navigator object.  I did a lot of testing and couldn&#039;t find a way to rely on them cross-browser.  Go try it out and you&#039;ll see that when you change your language, your navigator.language &#124;&#124; navigator.userLanguage &#124;&#124; navigator.systemLanguage &#124;&#124; navigator.userAgent &#124;&#124; navigator.browserLanguage don&#039;t necessarily change.  Maybe someone has a good client side technique for this, but I did some quick browsing through Dojo &amp; jQuery and didn&#039;t find any client side browser language detect (correct me if I&#039;m wrong).</description>
		<content:encoded><![CDATA[<p>@westonruter<br />
I couldn&#8217;t agree more.  I created it because of the complete deficiency in client-side language detection which should be functional.</p>
<p>@kriszyp<br />
There are a few properties that can tell you the language in the navigator object.  I did a lot of testing and couldn&#8217;t find a way to rely on them cross-browser.  Go try it out and you&#8217;ll see that when you change your language, your navigator.language || navigator.userLanguage || navigator.systemLanguage || navigator.userAgent || navigator.browserLanguage don&#8217;t necessarily change.  Maybe someone has a good client side technique for this, but I did some quick browsing through Dojo &amp; jQuery and didn&#8217;t find any client side browser language detect (correct me if I&#8217;m wrong).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kriszyp</title>
		<link>http://ajaxian.com/archives/language-jsonp-service/comment-page-1#comment-268552</link>
		<dc:creator>kriszyp</dc:creator>
		<pubDate>Thu, 30 Oct 2008 14:00:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4928#comment-268552</guid>
		<description>Doesn&#039;t this accomplish the same thing without an HTTP request:
var language = navigator.language &#124;&#124; navigator.userLanguage;
Is there a difference?</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t this accomplish the same thing without an HTTP request:<br />
var language = navigator.language || navigator.userLanguage;<br />
Is there a difference?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: itchyrich</title>
		<link>http://ajaxian.com/archives/language-jsonp-service/comment-page-1#comment-268546</link>
		<dc:creator>itchyrich</dc:creator>
		<pubDate>Thu, 30 Oct 2008 12:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4928#comment-268546</guid>
		<description>I&#039;m mulling over an OSS project to provide a Google Apps API that identifies the language of some sample text, or the text of the page on a given URI.

If anyone would particularly like to see that drop me a comment here or on my blog. It&#039;d be nice to have help but isn&#039;t too big a project alone either.

The techniques involved are pretty well understood:
http://richmarr.wordpress.com/2008/09/30/language-detection-using-trigrams/

It&#039;s also a cut-n-paste problem in the Java world, but it&#039;d be nice to have a funky open API on Appspot:
http://richmarr.wordpress.com/2008/10/24/creating-a-language-detection-api-in-30-minutes/</description>
		<content:encoded><![CDATA[<p>I&#8217;m mulling over an OSS project to provide a Google Apps API that identifies the language of some sample text, or the text of the page on a given URI.</p>
<p>If anyone would particularly like to see that drop me a comment here or on my blog. It&#8217;d be nice to have help but isn&#8217;t too big a project alone either.</p>
<p>The techniques involved are pretty well understood:<br />
<a href="http://richmarr.wordpress.com/2008/09/30/language-detection-using-trigrams/" rel="nofollow">http://richmarr.wordpress.com/2008/09/30/language-detection-using-trigrams/</a></p>
<p>It&#8217;s also a cut-n-paste problem in the Java world, but it&#8217;d be nice to have a funky open API on Appspot:<br />
<a href="http://richmarr.wordpress.com/2008/10/24/creating-a-language-detection-api-in-30-minutes/" rel="nofollow">http://richmarr.wordpress.com/2008/10/24/creating-a-language-detection-api-in-30-minutes/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tbroyer</title>
		<link>http://ajaxian.com/archives/language-jsonp-service/comment-page-1#comment-268544</link>
		<dc:creator>tbroyer</dc:creator>
		<pubDate>Thu, 30 Oct 2008 09:08:23 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4928#comment-268544</guid>
		<description>For the record, I just posted an idea on how to use it with GWT to automatically choose the appropriate locale for your application:
http://groups.google.fr/group/Google-Web-Toolkit/msg/e8ca2612aa72cfed
Maybe someone could test it and report how well/bad it actually works ;-)</description>
		<content:encoded><![CDATA[<p>For the record, I just posted an idea on how to use it with GWT to automatically choose the appropriate locale for your application:<br />
<a href="http://groups.google.fr/group/Google-Web-Toolkit/msg/e8ca2612aa72cfed" rel="nofollow">http://groups.google.fr/group/Google-Web-Toolkit/msg/e8ca2612aa72cfed</a><br />
Maybe someone could test it and report how well/bad it actually works ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: westonruter</title>
		<link>http://ajaxian.com/archives/language-jsonp-service/comment-page-1#comment-268542</link>
		<dc:creator>westonruter</dc:creator>
		<pubDate>Thu, 30 Oct 2008 07:31:06 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4928#comment-268542</guid>
		<description>I feel I should clarify: by &quot;terrible&quot; I don&#039;t mean to say that this app isn&#039;t clever; it is very useful. But its existence highlights a deficiency in the state of scripting in the browser.</description>
		<content:encoded><![CDATA[<p>I feel I should clarify: by &#8220;terrible&#8221; I don&#8217;t mean to say that this app isn&#8217;t clever; it is very useful. But its existence highlights a deficiency in the state of scripting in the browser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: westonruter</title>
		<link>http://ajaxian.com/archives/language-jsonp-service/comment-page-1#comment-268541</link>
		<dc:creator>westonruter</dc:creator>
		<pubDate>Thu, 30 Oct 2008 07:27:43 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4928#comment-268541</guid>
		<description>There&#039;s been a discussion in the WHATWG about adding the XMLHttpRequest interface to the HTMLDocument. 

http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016922.html
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016948.html

What follows is something I just posted there in response to this post:

[The Language JSONP Service] seems like a terrible workaround since the Accept-Language header is sent from the same browser that the script is running in; a script shouldn&#039;t have to make an HTTP request just to find out what the browser&#039;s request headers are.

Therefore, I propose that in addition to implementing on HTMLDocument the XMLHttpRequest interface subset I initially suggested, I see that it would also be very useful for a script to obtain the request headers that were sent which resulted in the current document as the response. The current version of XMLHttpRequest hints to a future version including a getRequestHeader() method, a method which would complement getResponseHeader(); there could also be a getAllRequestHeaders() method that would correspond to the existing getAllResponseHeaders() method. (Obviously it would not make sense to implement the setRequestHeader() method.)

If these two methods ( getRequestHeader() and getAllRequestHeaders() ) were implemented, then there would be no need for a &quot;Language JSONP Service&quot; because there would be a better way to get the same result synchronously without any HTTP request, for example: document.getRequestHeader(&#039;Accept-Language&#039;)</description>
		<content:encoded><![CDATA[<p>There&#8217;s been a discussion in the WHATWG about adding the XMLHttpRequest interface to the HTMLDocument. </p>
<p><a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016922.html" rel="nofollow">http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016922.html</a><br />
<a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016948.html" rel="nofollow">http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016948.html</a></p>
<p>What follows is something I just posted there in response to this post:</p>
<p>[The Language JSONP Service] seems like a terrible workaround since the Accept-Language header is sent from the same browser that the script is running in; a script shouldn&#8217;t have to make an HTTP request just to find out what the browser&#8217;s request headers are.</p>
<p>Therefore, I propose that in addition to implementing on HTMLDocument the XMLHttpRequest interface subset I initially suggested, I see that it would also be very useful for a script to obtain the request headers that were sent which resulted in the current document as the response. The current version of XMLHttpRequest hints to a future version including a getRequestHeader() method, a method which would complement getResponseHeader(); there could also be a getAllRequestHeaders() method that would correspond to the existing getAllResponseHeaders() method. (Obviously it would not make sense to implement the setRequestHeader() method.)</p>
<p>If these two methods ( getRequestHeader() and getAllRequestHeaders() ) were implemented, then there would be no need for a &#8220;Language JSONP Service&#8221; because there would be a better way to get the same result synchronously without any HTTP request, for example: document.getRequestHeader(&#8216;Accept-Language&#8217;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

