<?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: PHP Prepare your site for multilingual versions.</title>
	<atom:link href="http://www.dbuggr.com/simon-tite/php-prepare-site-multilingual-versions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dbuggr.com/simon-tite/php-prepare-site-multilingual-versions/</link>
	<description>Share Knowledge &#38; Be Rewarded</description>
	<lastBuildDate>Fri, 12 Mar 2010 15:58:02 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Simon Tite</title>
		<link>http://www.dbuggr.com/simon-tite/php-prepare-site-multilingual-versions/comment-page-1/#comment-283</link>
		<dc:creator>Simon Tite</dc:creator>
		<pubDate>Sun, 08 Nov 2009 13:25:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.dbuggr.com/simon-tite/php-prepare-site-multilingual-versions/#comment-283</guid>
		<description>This knowledge is probably somewhat out-dated, it only applies if you don&#039;t have the php &quot;gettext&quot; module installed. After a recent upgrade of my system to PHP5 and Ubuntu Karmic, this seems to be enabled by default, but I&#039;m not sure when this changed. Sorry if this information has confused anyone. (lesson learned: don&#039;t apply two major updates at the same time!)

However, IF the gettext module is NOT installed (check the phpinfo results), then:-

Create the following &quot;dummy&quot; function:-
&lt;code&gt;&lt;?php
    function _($tobetranslated) {
        return $tobetranslated;
    }
&lt;/code&gt;
As you can see, this function effectively does nothing yet. However, the function &quot;_&quot; is a standard name used in internationalisation to signify &quot;this is a string to be translated&quot;, and you should use this throughout your site wherever you output a string to the user,  Example:
&lt;code&gt;
&lt;h1&gt;&lt;?php echo _(&quot;Welcome to my website&quot;); ?&gt;&lt;/h1&gt;
&lt;/code&gt;

When you install some translation management software (.po .mo files), you can then replace the function _ to call the appropriate translation substitution software.

If you have the gettext function already installed, just be sure that all your output strings are passed through the function _(&quot;string to be translated&quot;), and it will use the untranslated string by default, if you have supplied no translations.

This is well worth doing if there is any possibility you might eventually want a multilingual site, it will save you a lot of time later on.</description>
		<content:encoded><![CDATA[<p>This knowledge is probably somewhat out-dated, it only applies if you don&#8217;t have the php &#8220;gettext&#8221; module installed. After a recent upgrade of my system to PHP5 and Ubuntu Karmic, this seems to be enabled by default, but I&#8217;m not sure when this changed. Sorry if this information has confused anyone. (lesson learned: don&#8217;t apply two major updates at the same time!)</p>
<p>However, IF the gettext module is NOT installed (check the phpinfo results), then:-</p>
<p>Create the following &#8220;dummy&#8221; function:-<br />
<pre><code>&lt;?php
&nbsp;&nbsp;&nbsp;&nbsp;function _($tobetranslated) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $tobetranslated;
&nbsp;&nbsp;&nbsp;&nbsp;}
</code></pre><br />
As you can see, this function effectively does nothing yet. However, the function &#8220;_&#8221; is a standard name used in internationalisation to signify &#8220;this is a string to be translated&#8221;, and you should use this throughout your site wherever you output a string to the user,  Example:<br />
<pre><code>
&lt;h1&gt;&lt;?php echo _(&quot;Welcome to my website&quot;); ?&gt;&lt;/h1&gt;
</code></pre></p>
<p>When you install some translation management software (.po .mo files), you can then replace the function _ to call the appropriate translation substitution software.</p>
<p>If you have the gettext function already installed, just be sure that all your output strings are passed through the function _(&#8221;string to be translated&#8221;), and it will use the untranslated string by default, if you have supplied no translations.</p>
<p>This is well worth doing if there is any possibility you might eventually want a multilingual site, it will save you a lot of time later on.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->