<?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>Techie-Gyan &#187; html</title>
	<atom:link href="http://www.techiegyan.com/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techiegyan.com</link>
	<description></description>
	<lastBuildDate>Fri, 25 Nov 2011 05:37:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A list of useful software tools – 3</title>
		<link>http://www.techiegyan.com/2011/04/19/a-list-of-useful-software-tools-%e2%80%93-3/</link>
		<comments>http://www.techiegyan.com/2011/04/19/a-list-of-useful-software-tools-%e2%80%93-3/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 17:58:24 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[addon]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1725</guid>
		<description><![CDATA[Top100 Tools for Learning 2010 View more presentations from Jane Hart]]></description>
			<content:encoded><![CDATA[<div style="width:425px" id="__ss_5467243"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/janehart/top100-tools-for-learning-2010" title="Top100 Tools for Learning 2010">Top100 Tools for Learning 2010</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/5467243" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/janehart">Jane Hart</a> </div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2011/04/19/a-list-of-useful-software-tools-%e2%80%93-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Page Templates &#8211; WordPress</title>
		<link>http://www.techiegyan.com/2010/09/26/using-page-templates-wordpress/</link>
		<comments>http://www.techiegyan.com/2010/09/26/using-page-templates-wordpress/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 18:47:41 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1464</guid>
		<description><![CDATA[WordPress allows you to create other pages like About Us or Contact Us page. These pages are different from regular posts as they are not part of set of posts you publish on your blog. They will not become part of post listing which comes on main page of your blog. WordPress provides creating pages [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress allows you to create other pages like About Us or Contact Us page. These pages are different from regular posts as they are not part of set of posts you publish on your blog. They will not become part of post listing which comes on main page of your blog. WordPress provides creating pages through Pages -> Add New and you can write the content of your page just like you write your blog post content. </p>
<p>You may want to do some extra things on these pages so you will require to do/setup certain things to achieve that. </p>
<p>1. You may need to install Exec-PHP plug-in, if you want to run some extra php code to achieve certain functionality on you page.<br />
2. You can define a new Page template in case you want to differ your page in look and feel from rest of the blog.</p>
<p><strong>Note:</strong> You will be able to select Page templates while creating/updating pages only when you have at least one custom page template in your theme. To create a custom page template follow steps below:</p>
<p>i. create a file custompage.php inside your theme&#8217;s directory e.g.<br />
ii. Copy content of page.php using Appearance -> Editor from your selected theme.<br />
iii. Paste it for custompage.php and save it.<br />
iv. Add following lines on top of custompage.php </p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/*
Template Name: Custom Template
*/
?&gt;
</pre>
<p>WordPress recognizes it as Page template using above coded embedded in the page and now you can select your page template in the right side box of page attributes.  You can make changes to custompage.php and pages based on that will change accordingly. </p>
<p><a href="http://www.techiegyan.com/wp-content/uploads/2010/09/ScreenShop.gif"><img src="http://www.techiegyan.com/wp-content/uploads/2010/09/ScreenShop.gif" alt="" title="ScreenShop" width="281" height="235" class="aligncenter size-full wp-image-1518" /></a></p>
<p>Using page templates you can achieve some of things which are  generally required on blog or websites:</p>
<p>1. Showing different images in header i.e. you can use altogether different headers for different pages.<br />
2. Showing different sidebars i.e. You can use pages differently by showing different side bars.<br />
3. Differentiating a page from regular post page. </p>
<p>You can get more details about pages and templates at <a href"http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates">http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2010/09/26/using-page-templates-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HTML5 Canvas &#8211; The Future of Graphics on the Web</title>
		<link>http://www.techiegyan.com/2010/08/21/html5-canvas-the-future-of-graphics-on-the-web/</link>
		<comments>http://www.techiegyan.com/2010/08/21/html5-canvas-the-future-of-graphics-on-the-web/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 16:02:34 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1460</guid>
		<description><![CDATA[HTML5 Canvas &#8211; The Future of Graphics on the Web View more presentations from Rob Hawkes.]]></description>
			<content:encoded><![CDATA[<div style="width:425px" id="__ss_3685784"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/robhawkes/html5-canvas-the-future-of-graphics-on-the-web" title="HTML5 Canvas - The Future of Graphics on the Web">HTML5 Canvas &#8211; The Future of Graphics on the Web</a></strong><object id="__sse3685784" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=barcampbournemouthcanvaskeynote-100410160445-phpapp02&#038;stripped_title=html5-canvas-the-future-of-graphics-on-the-web" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse3685784" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=barcampbournemouthcanvaskeynote-100410160445-phpapp02&#038;stripped_title=html5-canvas-the-future-of-graphics-on-the-web" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/robhawkes">Rob Hawkes</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2010/08/21/html5-canvas-the-future-of-graphics-on-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML 5 and CSS 3</title>
		<link>http://www.techiegyan.com/2010/06/03/html-5-and-css-3/</link>
		<comments>http://www.techiegyan.com/2010/06/03/html-5-and-css-3/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 09:42:35 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1392</guid>
		<description><![CDATA[Up to Speed on HTML 5 and CSS 3 View more presentations from M. Jackson Wilkinson.]]></description>
			<content:encoded><![CDATA[<div style="width:425px" id="__ss_1739893"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/whafro/up-to-speed-on-html-5-and-css-3" title="Up to Speed on HTML 5 and CSS 3">Up to Speed on HTML 5 and CSS 3</a></strong><object id="__sse1739893" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=refreshdc-html5css3-090719085307-phpapp01&#038;stripped_title=up-to-speed-on-html-5-and-css-3" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse1739893" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=refreshdc-html5css3-090719085307-phpapp01&#038;stripped_title=up-to-speed-on-html-5-and-css-3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/whafro">M. Jackson Wilkinson</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2010/06/03/html-5-and-css-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>i18n framework for HTML pages &#8211; jQuery</title>
		<link>http://www.techiegyan.com/2010/05/23/i18n-framework-for-html-pages-jquery/</link>
		<comments>http://www.techiegyan.com/2010/05/23/i18n-framework-for-html-pages-jquery/#comments</comments>
		<pubDate>Sun, 23 May 2010 13:26:15 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[addon]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1350</guid>
		<description><![CDATA[The problem is quite simple. You have HTML pages as your front end and you are not using any server side scripting to display your pages i.e. you are not using jsp or php or servlets to get HTML content. Application is HTML pages and javascript which is using Ajax to talk to back end [...]]]></description>
			<content:encoded><![CDATA[<p>The problem is quite simple. You have HTML pages as your front end and you are not using any server side scripting to display your pages i.e. you are not using jsp or php or servlets to get HTML content. Application is HTML pages and javascript which is using Ajax to talk to back end and getting and sending data to server according to user actions and on certain events and Multi-lingual interface is the requirement i.e. require i18n for front-end. </p>
<p>As most of the static content is coded in your HTML pages, one way to do this is figuring out user&#8217;s context and display him specific HTML page accordingly. That means maintaining different HTML pages for each language you want to support for your web application. This approach is little difficult because generally we  get changes very frequently on HTML pages so for maintaining it you also need to make changes in rest of HTML files for other languages. This requires testing for all languages as HTML files will also have some functional code with it and it may break for some languages while making changes. </p>
<p>We tried to solve this problem in slightly different manner. We tried to separate the display strings from HTML controls and tried to replace them with translations by figuring out the user&#8217;s language dynamically. In this way we have only one HTML page to maintain but we do have multiple resource files for language translations which keeps all static display strings translated for a certain language. As we need to do it on client side these resource files are basically Java script files having JSON objects with key and values. Keys are used to retrieve the display string value and replaced on HTML page. Following are the steps while loading the HTML page: </p>
<ul>
<li>Very first included javascript after library javascripts is i18n.js on the page.</li>
<li>i18n.js tries to load language from a cookie value, if it is not set then tries to get language setting of user from server using an Ajax request.</li>
<li>Once language is known, it downloads the translated javascript file from server e.g. if user language is French i.e. fr, it will load javascript file from http://server/contextpath/js/lang/&#8217; + _language + &#8216;/&#8217; +  getPageName() + &#8216;.js&#8217;. </li>
<li>All translated Java script files should reside in respective language folders and their names should match the page name i.e. the HTML page name so that a generic code can be written to retrieve correct translated Java script file.</li>
<li>In case there are some common strings used for all pages in web application, a common file _common.js can be created per language and can be downloaded along with page specific js.</li>
<li>Once you have all the resource ready. replace all display string placeholders from HTML page so that page can be viewed in user&#8217;s language.</li>
<li>Any other display message like Success and warning messages or any other content which is not the part of HTML page but getting generated dynamically using Java script should use the translated file to retrieve values against keys and display the translated text. </li>
</ul>
<p>Question is how to replace display strings in HTML page. Here is the way you should write your HTML page so that you can replace strings according to the language. </p>
<ul>
<li>Use span tag to enclose all Strings used on page as labels, texts etc. Have an id of each span and this id will be used to replace the language text for that span tag. </li>
<li>For controls like Select boxes and input tags use below code to replace texts</li>
<li>Use following geti18N() function to get translated text for the page while making dynamic strings</li>
</ul>
<pre class="brush: xml; title: ; notranslate">
&lt;span id=&quot;mylabel.id&quot; class=&quot;i18n&quot;&gt;&lt;/span&gt;
&lt;input type=&quot;button&quot; id=&quot;form.submit.button&quot; name=&quot;form.submit.button&quot; class=&quot;i18n&quot;&gt;&lt;/input&gt;
&lt;select id=&quot;someSelect&quot; class=&quot;i18n&quot;&gt;
    &lt;option id=&quot;select.option1&quot; value=&quot;1&quot;&gt;&lt;/option&gt;
    &lt;option id=&quot;select.option2&quot; value=&quot;2&quot;&gt;&lt;/option&gt;
&lt;/select&gt;
</pre>
<pre class="brush: jscript; title: ; notranslate">
function translate() {
	if (_translator) {
		$(&quot;span.i18n&quot;).each( function (i) {
			$(this).html(_translator[this.id]);
		});
		$(&quot;input.i18n&quot;).each( function (i) {
			$(this).val(_translator[this.id]);
		});
		$(&quot;select.i18n&quot;).each( function (i) {
			var opts = $(this)[0].options;
			if (opts)
				for(var i=0; i&lt;opts.length; i++) {
					opts[i].text = _translator[opts[i].id];
				}
		});
	}
}
</pre>
<p>You can see in the function above that class is used to for replacing translations in HTML file. Here _translator is the JSON object which is already loaded with translations as described earlier. Here is the example of translation file </p>
<pre class="brush: jscript; title: ; notranslate">
{
  &quot;key&quot;:&quot;value&quot;,
  &quot;mylabel.id&quot;:&quot;My Label&quot;,
  &quot;form.submit.button&quot;:&quot;Submit&quot;,
  &quot;select.option1&quot;:&quot;Option 1&quot;,
  &quot;select.option2&quot;:&quot;Option 2&quot;
}
</pre>
<p>For all dynamic Strings which are required while your getting success or error from server, you can use following function to get translated string from _translator object</p>
<pre class="brush: jscript; title: ; notranslate">
function getI18N(key) {
        var s = '';
	if(_translator[key]) {
		s = _translator[key];
	}
       return s;
}
</pre>
<p>Please post comments if you find it can be improved. Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2010/05/23/i18n-framework-for-html-pages-jquery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

