<?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>Dot.Collective &#187; PHP</title>
	<atom:link href="http://dot.collective.ro/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://dot.collective.ro</link>
	<description>Loading the dots</description>
	<lastBuildDate>Tue, 15 Jun 2010 13:24:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Find out if you&#8217;re missing translations in Magento</title>
		<link>http://dot.collective.ro/2010/06/find-out-if-youre-missing-translations-in-magento/</link>
		<comments>http://dot.collective.ro/2010/06/find-out-if-youre-missing-translations-in-magento/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 23:29:18 +0000</pubDate>
		<dc:creator>Adi</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://dot.collective.ro/?p=64</guid>
		<description><![CDATA[Let your visitors inform you about missing translations! This is for &#8216;exotic&#8217; languages, from what I&#8217;ve seen, the main languages are well covered and up-to-date with new versions of Magento, but who knows&#8230; Edit the file /app/code/core/Mage/Core/Model/Translate.php and go to the protected function _getTranslatedString($text, $code) On the else branch add the code so that it [...]]]></description>
			<content:encoded><![CDATA[<p>Let your visitors inform you about missing translations! This is for &#8216;exotic&#8217; languages, from what I&#8217;ve seen, the main languages are well covered and up-to-date with new versions of Magento, but who knows&#8230;</p>
<p>Edit the file /app/code/core/Mage/Core/Model/Translate.php and go to the <strong>protected  function _getTranslatedString($text, $code)</strong><br />
On the else branch add the code so that it looks like this:</p>
<pre class="brush: php">else {
if(isset($_SERVER[&#039;REQUEST_URI&#039;]) &amp;&amp; (strpos($_SERVER[&#039;REQUEST_URI&#039;], &#039;/admin&#039;) === false)) {
$f = fopen(&#039;var/translate-me.txt&#039;, &#039;a&#039;);
fwrite($f, date(&#039;Y-m-d H:i:s &#039;).$text . &#039; |&#039; . $_SERVER[&#039;HTTP_HOST&#039;].  $_SERVER[&#039;REQUEST_URI&#039;] .&quot;\n&quot;);
fclose($f);
}
$translated = $text;
}
</pre>
<p>And then occasionally check the file /var/translate-me.txt for new texts to translate in the locale files. You will catch all untranslated texts, with the url of the page that generated the missing translation.</p>
<p>Notes:<br />
- replace the &#8220;admin&#8221; check above with your own url to the admin interface<br />
- var folder should be writable<br />
- you will see untranslatable texts like category names, attributes, etc that are already localized but Magento tries to translate them anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://dot.collective.ro/2010/06/find-out-if-youre-missing-translations-in-magento/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

