<?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: Zend Framework: per module translation sources</title>
	<atom:link href="http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/</link>
	<description>Matthijs van den Bos&#039; thoughts on web development topics</description>
	<lastBuildDate>Tue, 13 Jul 2010 05:03:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jane Duyan</title>
		<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/comment-page-1/#comment-1884</link>
		<dc:creator>Jane Duyan</dc:creator>
		<pubDate>Fri, 04 Jun 2010 14:19:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vandenbos.org/?p=106#comment-1884</guid>
		<description>Interesting blog. I&#039;m just quite confused with how that tool works.</description>
		<content:encoded><![CDATA[<p>Interesting blog. I&#8217;m just quite confused with how that tool works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thomasw</title>
		<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/comment-page-1/#comment-1868</link>
		<dc:creator>thomasw</dc:creator>
		<pubDate>Sat, 27 Mar 2010 13:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vandenbos.org/?p=106#comment-1868</guid>
		<description>You can use multiple different adapters by using $adapter1-&gt;addTranslation($adapter2);

See here for details: http://www.thomasweidner.com/flatpress/2010/03/25/working-with-multiple-translation-sources/</description>
		<content:encoded><![CDATA[<p>You can use multiple different adapters by using $adapter1-&gt;addTranslation($adapter2);</p>
<p>See here for details: <a href="http://www.thomasweidner.com/flatpress/2010/03/25/working-with-multiple-translation-sources/" rel="nofollow">http://www.thomasweidner.com/flatpress/2010/03/25/working-with-multiple-translation-sources/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sidney Quito</title>
		<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/comment-page-1/#comment-1866</link>
		<dc:creator>Sidney Quito</dc:creator>
		<pubDate>Thu, 18 Mar 2010 02:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vandenbos.org/?p=106#comment-1866</guid>
		<description>Interesting blog you got here but I can&#039;t seem to find the RSS button.</description>
		<content:encoded><![CDATA[<p>Interesting blog you got here but I can&#8217;t seem to find the RSS button.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danny</title>
		<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/comment-page-1/#comment-1863</link>
		<dc:creator>Danny</dc:creator>
		<pubDate>Sat, 16 Jan 2010 19:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vandenbos.org/?p=106#comment-1863</guid>
		<description>@Nyk018 may I suggest poedit and enabling the gettext adapter if you have a large website.
http://blog.hackix.com/2010/01/configuring-poedit-for-zend-framework-projects/ shows you how.
Should work the same as above in every other respect (I think :))
I&#039;ll work up a post showing this alternative.</description>
		<content:encoded><![CDATA[<p>@Nyk018 may I suggest poedit and enabling the gettext adapter if you have a large website.<br />
<a href="http://blog.hackix.com/2010/01/configuring-poedit-for-zend-framework-projects/" rel="nofollow">http://blog.hackix.com/2010/01/configuring-poedit-for-zend-framework-projects/</a> shows you how.<br />
Should work the same as above in every other respect (I think <img src='http://blog.vandenbos.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )<br />
I&#8217;ll work up a post showing this alternative.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NykO18</title>
		<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/comment-page-1/#comment-1759</link>
		<dc:creator>NykO18</dc:creator>
		<pubDate>Mon, 19 Oct 2009 16:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vandenbos.org/?p=106#comment-1759</guid>
		<description>I was wondering, how are you collecting the terms to translate and build your translation file? When you have a huge website with thousands of sentences and words to translate, how come the Zend_Framework doesn&#039;t include a source scanner to collect everything? Because he does translate some terms alone and it&#039;s pretty much impossible to know which one will be automatically sent to Zend_Translate through another component and which one have to be translated manually.</description>
		<content:encoded><![CDATA[<p>I was wondering, how are you collecting the terms to translate and build your translation file? When you have a huge website with thousands of sentences and words to translate, how come the Zend_Framework doesn&#8217;t include a source scanner to collect everything? Because he does translate some terms alone and it&#8217;s pretty much impossible to know which one will be automatically sent to Zend_Translate through another component and which one have to be translated manually.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zend_Translate &#38; modular directory structure - Zend Framework Forum</title>
		<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/comment-page-1/#comment-7</link>
		<dc:creator>Zend_Translate &#38; modular directory structure - Zend Framework Forum</dc:creator>
		<pubDate>Sun, 19 Jul 2009 20:45:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vandenbos.org/?p=106#comment-7</guid>
		<description>[...] so happens I wrote an article on my blog about exactly this issue: per module translation sources. I think it can help you out. If you have any questions, you can leave a comment on the article or [...]</description>
		<content:encoded><![CDATA[<p>[...] so happens I wrote an article on my blog about exactly this issue: per module translation sources. I think it can help you out. If you have any questions, you can leave a comment on the article or [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zend_Application &#38; Zend_Translate - How to use the array adapter ? - Zend Framework Forum</title>
		<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/comment-page-1/#comment-6</link>
		<dc:creator>Zend_Application &#38; Zend_Translate - How to use the array adapter ? - Zend Framework Forum</dc:creator>
		<pubDate>Sun, 19 Jul 2009 20:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vandenbos.org/?p=106#comment-6</guid>
		<description>[...] I think you have an error in your ini settings for the translate resource. &#039;resources.translate.data&#039; is not an array, it should be a string pointing to your data:   PHP Code:    resources.translate.adapter&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;=&#160;&quot;array&quot; resources.translate.data&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;=&#160;APPLICATION_PATH&#160;&quot;/translations/&quot; resources.translate.options.scan&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;=&#160;&quot;directory&quot; resources.translate.options.disableNotices&#160;&#160;=&#160;true resources.translate.options.logUntranslated&#160;=&#160;true&#160;      The &#039;fileExt&#039; and &#039;directory&#039; settings don&#039;t exist.  If you want to know more about setting translation for multiple modules using Zend_Application and a custom translate resource, check my article about it: ZF: per module translations sources. [...]</description>
		<content:encoded><![CDATA[<p>[...] I think you have an error in your ini settings for the translate resource. &#39;resources.translate.data&#39; is not an array, it should be a string pointing to your data:   PHP Code:    resources.translate.adapter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&quot;array&quot; resources.translate.data&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;APPLICATION_PATH&nbsp;&quot;/translations/&quot; resources.translate.options.scan&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&quot;directory&quot; resources.translate.options.disableNotices&nbsp;&nbsp;=&nbsp;true resources.translate.options.logUntranslated&nbsp;=&nbsp;true&nbsp;      The &#39;fileExt&#39; and &#39;directory&#39; settings don&#39;t exist.  If you want to know more about setting translation for multiple modules using Zend_Application and a custom translate resource, check my article about it: ZF: per module translations sources. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michel</title>
		<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/comment-page-1/#comment-5</link>
		<dc:creator>Michel</dc:creator>
		<pubDate>Sat, 18 Jul 2009 02:56:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vandenbos.org/?p=106#comment-5</guid>
		<description>Maybe it&#039;s me... Maybe not...

oki...  I&#039;ve searched a little and found that when I have 

resources.translate.data = APPLICATION_PATH &quot;/modules/modulename/languages&quot;

in my module.ini it does load the additional languages BUT it change the locale property of Zend_Translate to the name of the last file loaded.

Tested by adding a zu.php in my module language folder containing
 &#039;Zoulou module example&#039;,);


And

print(Zend_Registry::get(&#039;Zend_Translate&#039;)-&gt;_(&quot;module example&quot;).&quot;\n&quot;);

Do return me

Zoulou module example

Even if Zend_Locale getLanguage return me &#039;en&#039; as expected.</description>
		<content:encoded><![CDATA[<p>Maybe it&#8217;s me&#8230; Maybe not&#8230;</p>
<p>oki&#8230;  I&#8217;ve searched a little and found that when I have </p>
<p>resources.translate.data = APPLICATION_PATH &#8220;/modules/modulename/languages&#8221;</p>
<p>in my module.ini it does load the additional languages BUT it change the locale property of Zend_Translate to the name of the last file loaded.</p>
<p>Tested by adding a zu.php in my module language folder containing<br />
 &#8216;Zoulou module example&#8217;,);</p>
<p>And</p>
<p>print(Zend_Registry::get(&#8216;Zend_Translate&#8217;)-&gt;_(&#8220;module example&#8221;).&#8221;\n&#8221;);</p>
<p>Do return me</p>
<p>Zoulou module example</p>
<p>Even if Zend_Locale getLanguage return me &#8216;en&#8217; as expected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michel</title>
		<link>http://blog.vandenbos.org/2009/07/09/zend-framework-per-module-translation-sources/comment-page-1/#comment-4</link>
		<dc:creator>Michel</dc:creator>
		<pubDate>Fri, 17 Jul 2009 23:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vandenbos.org/?p=106#comment-4</guid>
		<description>Again...  You&#039;ve did it!  Cool.

Tried and almost working.

My Accept-Language header is: 
en-ca,en-us;q=0.8,en;q=0.6,fr-ca;q=0.4,fr;q=0.2

Application.ini

resources.translate.data = APPLICATION_PATH &quot;/languages&quot;
resources.translate.locale = &quot;en&quot;
resources.translate.adapter = &quot;Array&quot;
resources.translate.options.scan = &quot;filename&quot;

I have

application/languages/en.php
application/languages/fr.php
application/languages/nl.php

application/modules/modulename/languages/en.php
application/modules/modulename/languages/fr.php
application/modules/modulename/languages/nl.phh

They are the same as yours!

Here is the results:

var_dump(Zend_Registry::get(&#039;Zend_Translate&#039;)-&gt;getMessages());
array(2) {
  [&quot;application&quot;]=&gt;
  string(10) &quot;applicatie&quot;
  [&quot;module example&quot;]=&gt;
  string(16) &quot;module voorbeeld&quot;
}

var_dump(Zend_Registry::get(&#039;Zend_Translate&#039;));
object(Zend_Translate)#25 (1) {
  [&quot;_adapter:private&quot;]=&gt;
  object(Zend_Translate_Adapter_Array)#24 (4) {
    [&quot;_data:private&quot;]=&gt;
    array(1) {
      [&quot;nl&quot;]=&gt;
      array(1) {
        [&quot;module example&quot;]=&gt;
        string(16) &quot;module voorbeeld&quot;
      }
    }
    [&quot;_automatic:private&quot;]=&gt;
    bool(false)
    [&quot;_options:protected&quot;]=&gt;
    array(8) {
      [&quot;clear&quot;]=&gt;
      bool(false)
      [&quot;disableNotices&quot;]=&gt;
      bool(false)
      [&quot;ignore&quot;]=&gt;
      string(1) &quot;.&quot;
      [&quot;locale&quot;]=&gt;
      string(2) &quot;nl&quot;
      [&quot;log&quot;]=&gt;
      NULL
      [&quot;logMessage&quot;]=&gt;
      string(49) &quot;Untranslated message within &#039;%locale%&#039;: %message%&quot;
      [&quot;logUntranslated&quot;]=&gt;
      bool(false)
      [&quot;scan&quot;]=&gt;
      string(8) &quot;filename&quot;
    }
    [&quot;_translate:protected&quot;]=&gt;
    array(3) {
      [&quot;en&quot;]=&gt;
      array(2) {
        [&quot;application&quot;]=&gt;
        string(11) &quot;application&quot;
        [&quot;module example&quot;]=&gt;
        string(14) &quot;module example&quot;
      }
      [&quot;fr&quot;]=&gt;
      array(2) {
        [&quot;application&quot;]=&gt;
        string(11) &quot;application&quot;
        [&quot;module example&quot;]=&gt;
        string(17) &quot;exemple de module&quot;
      }
      [&quot;nl&quot;]=&gt;
      array(2) {
        [&quot;application&quot;]=&gt;
        string(10) &quot;applicatie&quot;
        [&quot;module example&quot;]=&gt;
        string(16) &quot;module voorbeeld&quot;
      }
    }
  }
}


The locale in the Zend_Translate object in registry is &#039;nl&#039;. Something is wrong.</description>
		<content:encoded><![CDATA[<p>Again&#8230;  You&#8217;ve did it!  Cool.</p>
<p>Tried and almost working.</p>
<p>My Accept-Language header is:<br />
en-ca,en-us;q=0.8,en;q=0.6,fr-ca;q=0.4,fr;q=0.2</p>
<p>Application.ini</p>
<p>resources.translate.data = APPLICATION_PATH &#8220;/languages&#8221;<br />
resources.translate.locale = &#8220;en&#8221;<br />
resources.translate.adapter = &#8220;Array&#8221;<br />
resources.translate.options.scan = &#8220;filename&#8221;</p>
<p>I have</p>
<p>application/languages/en.php<br />
application/languages/fr.php<br />
application/languages/nl.php</p>
<p>application/modules/modulename/languages/en.php<br />
application/modules/modulename/languages/fr.php<br />
application/modules/modulename/languages/nl.phh</p>
<p>They are the same as yours!</p>
<p>Here is the results:</p>
<p>var_dump(Zend_Registry::get(&#8216;Zend_Translate&#8217;)-&gt;getMessages());<br />
array(2) {<br />
  ["application"]=&gt;<br />
  string(10) &#8220;applicatie&#8221;<br />
  ["module example"]=&gt;<br />
  string(16) &#8220;module voorbeeld&#8221;<br />
}</p>
<p>var_dump(Zend_Registry::get(&#8216;Zend_Translate&#8217;));<br />
object(Zend_Translate)#25 (1) {<br />
  ["_adapter:private"]=&gt;<br />
  object(Zend_Translate_Adapter_Array)#24 (4) {<br />
    ["_data:private"]=&gt;<br />
    array(1) {<br />
      ["nl"]=&gt;<br />
      array(1) {<br />
        ["module example"]=&gt;<br />
        string(16) &#8220;module voorbeeld&#8221;<br />
      }<br />
    }<br />
    ["_automatic:private"]=&gt;<br />
    bool(false)<br />
    ["_options:protected"]=&gt;<br />
    array(8) {<br />
      ["clear"]=&gt;<br />
      bool(false)<br />
      ["disableNotices"]=&gt;<br />
      bool(false)<br />
      ["ignore"]=&gt;<br />
      string(1) &#8220;.&#8221;<br />
      ["locale"]=&gt;<br />
      string(2) &#8220;nl&#8221;<br />
      ["log"]=&gt;<br />
      NULL<br />
      ["logMessage"]=&gt;<br />
      string(49) &#8220;Untranslated message within &#8216;%locale%&#8217;: %message%&#8221;<br />
      ["logUntranslated"]=&gt;<br />
      bool(false)<br />
      ["scan"]=&gt;<br />
      string(8) &#8220;filename&#8221;<br />
    }<br />
    ["_translate:protected"]=&gt;<br />
    array(3) {<br />
      ["en"]=&gt;<br />
      array(2) {<br />
        ["application"]=&gt;<br />
        string(11) &#8220;application&#8221;<br />
        ["module example"]=&gt;<br />
        string(14) &#8220;module example&#8221;<br />
      }<br />
      ["fr"]=&gt;<br />
      array(2) {<br />
        ["application"]=&gt;<br />
        string(11) &#8220;application&#8221;<br />
        ["module example"]=&gt;<br />
        string(17) &#8220;exemple de module&#8221;<br />
      }<br />
      ["nl"]=&gt;<br />
      array(2) {<br />
        ["application"]=&gt;<br />
        string(10) &#8220;applicatie&#8221;<br />
        ["module example"]=&gt;<br />
        string(16) &#8220;module voorbeeld&#8221;<br />
      }<br />
    }<br />
  }<br />
}</p>
<p>The locale in the Zend_Translate object in registry is &#8216;nl&#8217;. Something is wrong.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
