<?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>Drumhead Trap &#187; tips</title>
	<atom:link href="http://www.adriansilva.org/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adriansilva.org</link>
	<description>Skins and patches</description>
	<lastBuildDate>Thu, 12 May 2011 15:03:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WordPress i18n tips</title>
		<link>http://www.adriansilva.org/2009/01/31/wordpress-i18n-tips/</link>
		<comments>http://www.adriansilva.org/2009/01/31/wordpress-i18n-tips/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 10:58:52 +0000</pubDate>
		<dc:creator>skiold</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.adriansilva.org/?p=220</guid>
		<description><![CDATA[Lately I&#8217;m doing a fair amount of i18n in WordPress themes. Most newer themes include some i18n support (especially the sandbox-based ones); but themes based on older and legacy theme template tend to include  i18n-unfriendly code. I&#8217;m trying to collect some good practices and advise for those trying to add i18n support to their themes: [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;m doing a fair amount of <a href="http://en.wikipedia.org/wiki/I18n">i18n</a> in WordPress themes. Most newer themes include some i18n support (especially the sandbox-based ones); but themes based on older and legacy theme template tend to include  i18n-unfriendly code.</p>
<p>I&#8217;m trying to collect some good practices and advise for those trying to add i18n support to their themes:</p>
<ul>
<li><strong>Read the <a title="I18n for WordPress Developers" href="http://codex.wordpress.org/User:Nbachiyski/I18n_for_WordPress_Developers">WordPress documentation</a></strong> on i18n. Print their <a title="Wordpress i18n Best Practices" href="http://codex.wordpress.org/User:Nbachiyski/I18n_for_WordPress_Developers#Best_Pratices">best practices</a>, put them in a visible place and recite them before any i18n effort.</li>
<li><strong>Use plenty of format strings</strong>. Ok, you already read the best practices, so you known I&#8217;m repeating them here. For better format strings use <a href="http://codex.wordpress.org/User:Nbachiyski/I18n_for_WordPress_Developers#Descriptions">descriptions and comments</a> (the _c() function)</li>
<li><strong>Use boilerplate copy everywhere</strong>. Don&#8217;t be too original with the text you include in your theme; &#8220;Submit It&#8221; better than &#8220;Say It Pal!&#8221; for a submit button. If your theme includes strings used by most other themes, chances are those strings are already i18n and l10n in . You can always have private copies of your theme with unique headers, titles, and button; the version you share should be as plain and simple as possible.</li>
<li><strong>Keep out strings that need no translation</strong>: and don&#8217;t skip small strings subject to translation; alt and title html parameters, submit buttons value, <a href="http://codex.wordpress.org/Template_Tags/next_post_link">next|prev_post_link</a> and other wp template tags, all accept i18n. See the next two samples; why &#8220;Comments&#8221; is left out of the _e() function?; is there a translation for &#8216;|&#8217; in any language?<br />
<blockquote><p>&lt;?php _e($numComments, &#8216;XXXXXXX&#8217;); ?&gt; Comment(s)</p></blockquote>
<blockquote><p>__(&#8216; | &#8216;)</p></blockquote>
</li>
</ul>
<p>The last and best tip is to use a theme with good i18n support and clean code as base template; <a href="http://www.plaintxt.org/wp-content/uploads/sandbox_readme.html">sandbox</a> is a great, clean, and fully i18n WP theme.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adriansilva.org/2009/01/31/wordpress-i18n-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php default charsets</title>
		<link>http://www.adriansilva.org/2009/01/23/php-default-charsets/</link>
		<comments>http://www.adriansilva.org/2009/01/23/php-default-charsets/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 09:29:52 +0000</pubDate>
		<dc:creator>skiold</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[htacces]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[visualtis]]></category>

		<guid isPermaLink="false">http://www.adriansilva.org/?p=217</guid>
		<description><![CDATA[Un problema muchas veces repetido cuando no trabajas en ingles y ASCII. No siempre se controla la codificacion que se usa en distintos entornos de trabajo y produccion; al final acaban apareciendo caracteres extraños y problemas de codificacion. Working with many development and production some people forgets to check their default charsets; in the end [...]]]></description>
			<content:encoded><![CDATA[<p>Un problema muchas veces repetido cuando no trabajas en ingles y ASCII. No siempre se controla la codificacion que se usa en distintos entornos de trabajo y produccion; al final acaban apareciendo caracteres extraños y problemas de codificacion.</p>
<p>Working with many development and production some people forgets to check their default charsets; in the end encoding mismatchs crawl. I&#8217;ve seen a few programmers falling in this trap.</p>
<p>Last time our php was Latin-1 encoded and the production Apache server used Utf-8 by default. In a shared hosting environments the default encoding can be set from the .htaccess file:</p>
<blockquote><p>AddCharset ISO-8859-1 .php<br />
AddDefaultCharset ISO-8859-1</p></blockquote>
<p>Same thing <a href="http://www.w3.org/International/O-HTTP-charset">from php</a>:</p>
<blockquote><p>PHP. Use the header() function before generating any content, e.g.:<br />
header(&#8216;Content-type: text/html; charset=utf-8&#8242;);</p></blockquote>
<p>Links and discussion:</p>
<ul>
<li>Basics on <a href="http://www.w3.org/International/O-HTTP-charset">http charset parameter</a> at w3c.</li>
<li><a href="http://www.w3.org/International/questions/qa-htaccess-charset">Apache .htacces</a> usage.</li>
<li>Handy list of <a href="http://www.iana.org/assignments/character-sets">IANA accepted encoding names</a> recognized by apache.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.adriansilva.org/2009/01/23/php-default-charsets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

