<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Henrik Falck&#039;s blog &#187; improvements</title>
	<atom:link href="http://henrikfalck.com/blog/tag/improvements/feed" rel="self" type="application/rss+xml" />
	<link>http://henrikfalck.com/blog</link>
	<description>reinventing web 3.0</description>
	<lastBuildDate>Mon, 12 Apr 2010 00:33:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Localization support for language identifier</title>
		<link>http://henrikfalck.com/blog/2010/04/localization-support-for-language-identifier.html</link>
		<comments>http://henrikfalck.com/blog/2010/04/localization-support-for-language-identifier.html#comments</comments>
		<pubDate>Sun, 11 Apr 2010 03:18:40 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[improvements]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[language analyzer]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web apps]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog/?p=370</guid>
		<description><![CDATA[Something&#8217;s wrong when a language identifier doesn&#8217;t have localization support. So I cooked up a little localization code for What Language Is This?, which proved to be not as easy as one might guess. That&#8217;s because some of the textual content of the web app is in HTML, other is generated by PHP, and yet [...]]]></description>
			<content:encoded><![CDATA[<p>Something&#8217;s wrong when a language identifier doesn&#8217;t have localization support. So I cooked up a little localization code for <a href="http://whatlanguageisthis.com/" title="What Language Is This? Online language identifier"  target="_blank">What Language Is This?</a>, which proved to be not as easy as one might guess. That&#8217;s because some of the textual content of the web app is in HTML, other is generated by PHP, and yet other is generated in JavaScript. I wanted to have one single source of localized strings for all three output paths to simplify overviewing, translating, changing, and adding strings to the web app.</p>
<p>I&#8217;m not sure if there&#8217;s any good solution for this out there, but I cooked up my own. Each language translation has its strings in a text file formatted like an ini file with id keys and localized strings separated by an equals sign. You can view the <a href="http://whatlanguageisthis.com/strings-en.txt"  target="_blank">English</a> and <a href="http://whatlanguageisthis.com/strings-ja.txt"  target="_blank">Japanese</a> raw text files if you like. These are read into a PHP array (i.e. dictionary), after first looking at what language is specified by the URL (/en for English, /ja for Japanese or any other code), and if that is not specified then looking at what languages the browser is set to prefer via the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4"  target="_blank">Accept-Language</a> HTTP header. If the requested language is not available then default to English.</p>
<p>To get the html output localized, the php script that reads through and configures the app (the plain html file itself is set up to run offline for debugging purposes only) looks for string ids enclosed in percent signs, i.e. like %strings id%. These are then replaced with the localized strings from the dictionary. The php-generated content is trivially changed to look up strings from the dictionary. On the JavaScript side, I wanted access to the same string dictionary that I had on the php side, so this is inserted into a &lt;script&gt; block of the generated html output as a JavaScript object (i.e. dictionary). String id lookups can then be done on this object from the JavaScript code just like on the php side. In other words, the php string dictionary is converted into JSON, which is used from the JavaScript side.</p>
<div id="attachment_371" class="wp-caption aligncenter" style="width: 310px"><a href="http://henrikfalck.com/blog/wp-content/uploads/2010/04/wlit-japanese.jpg" ><img class="size-medium wp-image-371" title="あれ何語？ What Language Is This? in 日本語" src="http://henrikfalck.com/blog/wp-content/uploads/2010/04/wlit-japanese-300x186.jpg" alt="あれ何語？ What Language Is This? in 日本語" width="300" height="186" /></a><p class="wp-caption-text">あれ何語？ What Language Is This? in 日本語</p></div>
<p>It all works pretty well and meets my goals. The only downside is that it relies on the server to do some processing, so when I develop on the offline version the strings aren&#8217;t available, instead I get to see the raw string ids, which can be useful too, but you have to rely on imagination to envision the end result. Isn&#8217;t programming always like that anyway, though?</p>
<p>The first translated version of What Language Is This? is of course <a href="http://whatlanguageisthis.com/ja" title="ウェブ上言語識別サービス"  target="_blank">Japanese</a>, done by myself and my wife (初めての共同作業? lol), not just because it&#8217;s easy for me to do, but also because when looking at the <a href="http://addthis.com/"  target="_blank">AddThis</a> stats, Japan is the top ranking country, and also as you know the average English skills in Japan are pretty bad, so I suspect there is a demand for a Japanese translation. Looking at the access stats, and discounting those with good English skills (India, Netherlands, Scandinavia, for example), next in line would most likely be Spanish, French, and German, in that order. Anyone feel like helping? Please drop me a comment in that case. I can offer proper credit and a link back from the site in return.</p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2010/04/localization-support-for-language-identifier.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>More Dravidian language identification</title>
		<link>http://henrikfalck.com/blog/2009/06/more-dravidian-language-identification.html</link>
		<comments>http://henrikfalck.com/blog/2009/06/more-dravidian-language-identification.html#comments</comments>
		<pubDate>Tue, 16 Jun 2009 12:27:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[improvements]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[language analyzer]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2009/06/more-dravidian-language-identification.html</guid>
		<description><![CDATA[Lately, What Language Is This?, the web-based language identification tool I&#8217;m running, has been getting many hits from Tamil-language sources, probably as a result of being covered in two seemingly popular blogs, techintamil.blogspot.com, and tamilnenjam.com. As another blogger pointed out,
Also this service is very good at identifying indic languages (where as many other services fail [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, <a href="http://whatlanguageisthis.com/" >What Language Is This?</a>, the web-based language identification tool I&#8217;m running, has been getting many hits from <span style="font-weight: bold;">Tamil</span>-language sources, probably as a result of being covered in two seemingly popular blogs, <a rel="nofollow" href="http://techintamil.blogspot.com/2009/06/foreign-language-detection-tools.html" >techintamil.blogspot.com</a>, and <a href="http://www.tamilnenjam.org/2009/06/blog-post_11.html" >tamilnenjam.com</a>. <a href="http://www.techdreams.org/tips-tricks/how-to-identify-language-of-unknown-text/2739-20090609" >As another blogger pointed</a> out,<br />
<blockquote style="font-style: italic;">Also this service is very good at identifying indic languages (where as many other services fail to understand).</p></blockquote>
<p>Well, thanks. And yes, I have been making sure that the languages of the Indian subcontinent and its surrounding areas are thoroughly supported for identification.</p>
<p><span style="font-weight: bold; font-style: italic;">But two notable languages have been missing</span>, and I finally got around to adding them. Namely the two Dravidian languages <span style="font-weight: bold;">Malayalam</span> (not to be confused with Malay, to which it is unrelated) and <span style="font-weight: bold;">Kannada</span> (not to be confused with Canada, to which it is unrelated).</p>
<p>Together with the already supported <span style="font-weight: bold;">Tamil</span> and <span style="font-weight: bold;">Telugu</span>, this means that <span style="font-weight: bold; font-style: italic;">all four literary Dravidian languages are supported now!</span> I hope this will be of use to many, and I&#8217;d like to thank the Dravidian-speaking bloggers for their support in the form of writing about the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2009/06/more-dravidian-language-identification.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Feedback Feature for What Language Is This?</title>
		<link>http://henrikfalck.com/blog/2009/02/new-feedback-feature-for-what-language.html</link>
		<comments>http://henrikfalck.com/blog/2009/02/new-feedback-feature-for-what-language.html#comments</comments>
		<pubDate>Sun, 01 Feb 2009 13:03:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[improvements]]></category>
		<category><![CDATA[language analyzer]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[web apps]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2009/02/new-feedback-feature-for-what-language-is-this.html</guid>
		<description><![CDATA[I got around to implementing a feature I&#8217;ve been planning for What Language Is This? today: feedback. Not the comments &#8211; that&#8217;s been there from the start &#8211; but a way of sending immediate feedback on specific results. So that if you disagree with the result, or you know the correct language but it&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p>I got around to implementing a feature I&#8217;ve been planning for <a href="http://whatlanguageisthis.com/" style="font-weight: bold; font-style: italic;" >What Language Is This?</a> today: <span style="font-weight: bold;">feedback</span>. Not the comments &#8211; that&#8217;s been there from the start &#8211; but a way of sending immediate feedback on specific results. So that if you disagree with the result, or you know the correct language but it&#8217;s not yet supported, just click on <span style="font-style: italic;">&#8220;send feedback&#8221;</span> that appears with each result, and a simple form pops up that where you can indicate what the problem with that result is.</p>
<p><a href="http://henrikfalck.com/blog/uploaded_images/language-identifier-feedback-782126.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" ><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 261px;" src="http://henrikfalck.com/blog/uploaded_images/language-identifier-feedback-782122.jpg" alt="" border="0" /></a><br />The entered text can also be sent with the feedback, allowing me to gather more sample texts to use as material for the statistical analysis used as a basis when identifying the language, and for testing (there&#8217;s an automatic test feature built in to <a href="http://whatlanguageisthis.com/" >What Language Is This?</a>, just run <span style="font-family: courier new;">selftest()</span> from a JavaScript console on the page and it&#8217;ll test all supported languages to check for regressions &#8211; very handy when updating the database, since it&#8217;s easy to accidentally break some of the fine tuning).</p>
<p>Anyway, I think it&#8217;ll be useful, and I hope everyone will use it a lot since it&#8217;ll help me improve the site. I&#8217;m already getting a lot of useful and encouraging comments so it&#8217;s really fun to keep on developing it. For the next update I&#8217;ll probably add more languages.</p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2009/02/new-feedback-feature-for-what-language.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

