<?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>Query7 &#187; tutorial</title>
	<atom:link href="http://query7.com/category/tutorial/feed" rel="self" type="application/rss+xml" />
	<link>http://query7.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 09 Apr 2010 09:36:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Working with Google&#8217;s Language API</title>
		<link>http://query7.com/working-with-googles-language-apis</link>
		<comments>http://query7.com/working-with-googles-language-apis#comments</comments>
		<pubDate>Sat, 07 Mar 2009 11:28:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://query7.com/?p=378</guid>
		<description><![CDATA[<p>Google translate is used by millions of people every day. Combine this with the easy reporting of language errors/mistakes makes it one of the most comprehensive and accurate online translators. Google provides an easy to use API to access their&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Google translate is used by millions of people every day. Combine this with the easy reporting of language errors/mistakes makes it one of the most comprehensive and accurate online translators. Google provides an easy to use API to access their large language database, we&#8217;ll be using that today.</p>
<p>It will consist of two textareas, two dropdowns and one button. It will look something like this:</p>
<p><a href="http://query7.com/wp-content/uploads/2009/02/preview.gif"><img class="alignnone size-medium wp-image-379" src="http://query7.com/wp-content/uploads/2009/02/preview-300x273.gif" alt="" width="300" height="273" /></a></p>
<h2>HTML</h2>
<p>The HTML code is fairly straight foward. Notice the dropdown menus have <em>value</em>s. These are essential as this is the language code, it&#8217;s sent to Google.</p>
<pre>&lt;body&gt;
&lt;div class="he"&gt;
&lt;h2&gt;Translate&lt;/h2&gt;
From:
&lt;select id="from"&gt;
&lt;option value=sq&gt;Albanian&lt;/option&gt;&lt;option value=ar&gt;Arabic&lt;/option&gt;&lt;option value=bg&gt;Bulgarian&lt;/option&gt;&lt;option value=ca&gt;Catalan&lt;/option&gt;&lt;option value=zh-CN&gt;Chinese (Simplified)&lt;/option&gt;&lt;option value=zh-TW&gt;Chinese (Traditional)&lt;/option&gt;&lt;option value=hr&gt;Croatian&lt;/option&gt;&lt;option value=cs&gt;Czech&lt;/option&gt;&lt;option value=da&gt;Danish&lt;/option&gt;&lt;option value=nl&gt;Dutch&lt;/option&gt;&lt;option value=en selected&gt;English&lt;/option&gt;&lt;option value=et&gt;Estonian&lt;/option&gt;&lt;option value=tl&gt;Filipino&lt;/option&gt;&lt;option value=fi&gt;Finnish&lt;/option&gt;&lt;option value=fr&gt;French&lt;/option&gt;&lt;option value=gl&gt;Galician&lt;/option&gt;&lt;option value=de&gt;German&lt;/option&gt;&lt;option value=el&gt;Greek&lt;/option&gt;&lt;option value=iw&gt;Hebrew&lt;/option&gt;&lt;option value=hi&gt;Hindi&lt;/option&gt;&lt;option value=hu&gt;Hungarian&lt;/option&gt;&lt;option value=id&gt;Indonesian&lt;/option&gt;&lt;option value=it&gt;Italian&lt;/option&gt;&lt;option value=ja&gt;Japanese&lt;/option&gt;&lt;option value=ko&gt;Korean&lt;/option&gt;&lt;option value=lv&gt;Latvian&lt;/option&gt;&lt;option value=lt&gt;Lithuanian&lt;/option&gt;&lt;option value=mt&gt;Maltese&lt;/option&gt;&lt;option value=no&gt;Norwegian&lt;/option&gt;&lt;option value=pl&gt;Polish&lt;/option&gt;&lt;option value=pt&gt;Portuguese&lt;/option&gt;&lt;option value=ro&gt;Romanian&lt;/option&gt;&lt;option value=ru&gt;Russian&lt;/option&gt;&lt;option value=sr&gt;Serbian&lt;/option&gt;&lt;option value=sk&gt;Slovak&lt;/option&gt;&lt;option value=sl&gt;Slovenian&lt;/option&gt;&lt;option value=es&gt;Spanish&lt;/option&gt;&lt;option value=sv&gt;Swedish&lt;/option&gt;&lt;option value=th&gt;Thai&lt;/option&gt;&lt;option value=tr&gt;Turkish&lt;/option&gt;&lt;option value=uk&gt;Ukrainian&lt;/option&gt;&lt;option value=vi&gt;Vietnamese&lt;/option&gt;
&lt;/select&gt;

To:
&lt;select id="to"&gt;
&lt;option value=sq&gt;Albanian&lt;/option&gt;&lt;option value=ar&gt;Arabic&lt;/option&gt;&lt;option value=bg&gt;Bulgarian&lt;/option&gt;&lt;option value=ca&gt;Catalan&lt;/option&gt;&lt;option value=zh-CN&gt;Chinese (Simplified)&lt;/option&gt;&lt;option value=zh-TW&gt;Chinese (Traditional)&lt;/option&gt;&lt;option value=hr&gt;Croatian&lt;/option&gt;&lt;option value=cs&gt;Czech&lt;/option&gt;&lt;option value=da&gt;Danish&lt;/option&gt;&lt;option value=nl&gt;Dutch&lt;/option&gt;&lt;option value=en selected&gt;English&lt;/option&gt;&lt;option value=et&gt;Estonian&lt;/option&gt;&lt;option value=tl&gt;Filipino&lt;/option&gt;&lt;option value=fi&gt;Finnish&lt;/option&gt;&lt;option value=fr&gt;French&lt;/option&gt;&lt;option value=gl&gt;Galician&lt;/option&gt;&lt;option value=de&gt;German&lt;/option&gt;&lt;option value=el&gt;Greek&lt;/option&gt;&lt;option value=iw&gt;Hebrew&lt;/option&gt;&lt;option value=hi&gt;Hindi&lt;/option&gt;&lt;option value=hu&gt;Hungarian&lt;/option&gt;&lt;option value=id&gt;Indonesian&lt;/option&gt;&lt;option value=it&gt;Italian&lt;/option&gt;&lt;option value=ja&gt;Japanese&lt;/option&gt;&lt;option value=ko&gt;Korean&lt;/option&gt;&lt;option value=lv&gt;Latvian&lt;/option&gt;&lt;option value=lt&gt;Lithuanian&lt;/option&gt;&lt;option value=mt&gt;Maltese&lt;/option&gt;&lt;option value=no&gt;Norwegian&lt;/option&gt;&lt;option value=pl&gt;Polish&lt;/option&gt;&lt;option value=pt&gt;Portuguese&lt;/option&gt;&lt;option value=ro&gt;Romanian&lt;/option&gt;&lt;option value=ru&gt;Russian&lt;/option&gt;&lt;option value=sr&gt;Serbian&lt;/option&gt;&lt;option value=sk&gt;Slovak&lt;/option&gt;&lt;option value=sl&gt;Slovenian&lt;/option&gt;&lt;option value=es&gt;Spanish&lt;/option&gt;&lt;option value=sv&gt;Swedish&lt;/option&gt;&lt;option value=th&gt;Thai&lt;/option&gt;&lt;option value=tr&gt;Turkish&lt;/option&gt;&lt;option value=uk&gt;Ukrainian&lt;/option&gt;&lt;option value=vi&gt;Vietnamese&lt;/option&gt;

&lt;/select&gt;
&lt;/div&gt;

&lt;div class="tebg"&gt;
&lt;table&gt;
&lt;tr&gt;&lt;td&gt;&lt;textarea rows="10" cols="60" id="or" class="te"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;textarea rows="10" cols="60" id="tr" class="te"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;

&lt;input type="submit" id="translate" value="Translate" /&gt;
&lt;div id="translation"&gt;&lt;/div&gt;
&lt;/body&gt;</pre>
<p>We&#8217;ll start by including Google&#8217;s Language API and jQuery. We can&#8217;t link directly to a language.js file, instead we need to use Google&#8217;s own <em>load</em> function. jQuery will also be included this way.</p>
<pre>

google.load("language", "1");
google.load("jquery", "1.3.2");
</pre>
<p>We need to use jQuery to get 3 values. The textarea containing the words they want translated, the language it is currently in and the language they want it translated into. We only want to capture these when the user clicks the translate button so we wrap it in the <em>click</em> event.</p>
<pre>
    $(document).ready(function(){

		    $("#translate").click(function(){

		        var from = $("#from").val();
			var to = $("#to").val();

			var orig = $("#or").val();

			    });

	});
</pre>
<p>Now we need to use Google&#8217;s translate function. It takes several parameters &#8211; the text we want translated (<em>orig</em>), the language the text was in (<em>from</em>) and the language we want it translated to (<em>to</em>). We capture the information google sends back to is in <em>result</em>. If there are no errors then we set the textarea to the translated text.</p>
<pre>
google.language.translate(orig, from, to, function(result) {

	if(!result.error)
	{

		$("#tr").val(result.translation);

	}

	});
</pre>
<p>If you have any questions or comments feel free to post them below.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/working-with-googles-language-apis/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpbb2 being pulled</title>
		<link>http://query7.com/phpbb2-being-pulled</link>
		<comments>http://query7.com/phpbb2-being-pulled#comments</comments>
		<pubDate>Thu, 24 Apr 2008 01:42:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.query7.com/?p=32</guid>
		<description><![CDATA[<p><a href="http://www.query7.com/wp-content/uploads/2008/04/phpbb.jpg"><img class="alignnone size-medium wp-image-33" title="phpbb" src="http://www.query7.com/wp-content/uploads/2008/04/phpbb-300x118.jpg" alt="" width="414" height="118" /></a></p>
<p>The popular discussion board phpbb2 is being pulled/development dropped. Security patches and support will be given until January 2009 and you will be able to download the software from the website until the 1st of Ocbober 2008 . phpBB2&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.query7.com/wp-content/uploads/2008/04/phpbb.jpg"><img class="alignnone size-medium wp-image-33" title="phpbb" src="http://www.query7.com/wp-content/uploads/2008/04/phpbb-300x118.jpg" alt="" width="414" height="118" /></a></p>
<p>The popular discussion board phpbb2 is being pulled/development dropped. Security patches and support will be given until January 2009 and you will be able to download the software from the website until the 1st of Ocbober 2008 . phpBB2 has been plagued by a large number of vulnerabilities, a significant number of them were through user submitted modifications.</p>
<p>phpBB 3 started strong and is continuing to do so. With more database types being support, and a massive new set of administrator controls, it&#8217;s set up to compete with the likes of MyBB and Simple Machine Forums. People often look back at <a href="http://forums.devshed.com/php-development-5/help-me-test-4914.html">this</a> thread, posted when phpBB 1 was undergoing testing.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/phpbb2-being-pulled/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tune Into Shoutcasts With VLC</title>
		<link>http://query7.com/tune-into-shoutcasts-with-vlc</link>
		<comments>http://query7.com/tune-into-shoutcasts-with-vlc#comments</comments>
		<pubDate>Mon, 21 Apr 2008 17:50:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.query7.com/?p=21</guid>
		<description><![CDATA[<p>Heres a quick tutorial on how to stream internet radio, in particular shoutcast, through VLC media player. Most people stream through Windows Media Player or Winamp, but if you like Open Source applications like me, heres how you do it.&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Heres a quick tutorial on how to stream internet radio, in particular shoutcast, through VLC media player. Most people stream through Windows Media Player or Winamp, but if you like Open Source applications like me, heres how you do it.</p>
<p>File -> Open Network Stream<br />
<img title="step1-VLCshoutcast" src="http://www.query7.com/wp-content/uploads/2008/04/step1-300x185.gif" alt="" width="300" height="185" /></p>
<p>Select the <em>HTTP/HTTPS/FTP/MMS</em> box and in the form, enter the URL of the shoutcast server, with the port. In my case its <em>enaxi.com:8000</em> . Then click OK.</p>
<p><a href='http://www.query7.com/wp-content/uploads/2008/04/step2.gif'><img src="http://www.query7.com/wp-content/uploads/2008/04/step2-300x218.gif" alt="" title="step2" width="300" height="218" class="alignnone size-medium wp-image-22" /></a></p>
<p>And tadah.. It works!</p>
<p><a href='http://www.query7.com/wp-content/uploads/2008/04/step3.gif'><img src="http://www.query7.com/wp-content/uploads/2008/04/step3-300x87.gif" alt="" title="step3" width="300" height="87" class="alignnone size-medium wp-image-23" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/tune-into-shoutcasts-with-vlc/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
