Check out Catalyst::Plugin::Localize::Simple<div><br><div><a href="http://search.cpan.org/~wehr/Catalyst-Plugin-Localize-Simple-1.1/lib/Catalyst/Plugin/Localize/Simple.pm">http://search.cpan.org/~wehr/Catalyst-Plugin-Localize-Simple-1.1/lib/Catalyst/Plugin/Localize/Simple.pm</a><br>

<br></div><div>I made it to overcome the learning curve of i18n, and it works very well. Used it to translate English to Spanish, French, Japanese, Italian, Portuguese, and Chinese Simplified. I provided a CMS for the translation team to create and modify these translation files. Very simple and straight forward. Let me know if you have questions on usage.</div>

<div><br></div><div>-nw</div><div><br></div><div><br><div class="gmail_quote">On Wed, Aug 4, 2010 at 1:04 AM, Ton Voon <span dir="ltr">&lt;<a href="mailto:ton.voon@opsera.com">ton.voon@opsera.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
On 2 Aug 2010, at 06:08, Julien Sobrier wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
I&#39;ve started to translate my website using Catalyst::Plugin::I18N. It<br>
works fine for static text. Bu I can&#39;t make it work for variables. For<br>
example, I need to a translation for [% foo %] where for can take a<br>
set of values defined in a database.<br>
<br>
I&#39;m sot sure what is the best way to translate such variables, and<br>
what is possible:<br>
* add a msgid for each possible value in messages.po =&gt; those gets<br>
removed every time I run <a href="http://xgettext.pl" target="_blank">xgettext.pl</a><br>
* Make the translation in my Database layer =&gt; unfortunately I use the<br>
old Class::DBI, and could not find a plugin for it<br>
* any other option?<br>
</blockquote>
<br></div>
What I do is use the variable to work out the dynamic name, and then in a dummy template file, have the possible options. Eg:<br>
<br>
[% menu_name=&quot;Configuration&quot;; c.loc(menu_name) %]<br>
<br>
Then in a dummy template file, have:<br>
<br>
[% c.loc(&quot;Configuration&quot;) %]<br>
<br>
This way <a href="http://xgettext.pl" target="_blank">xgettext.pl</a> will always find it to put into messages.po. It means having to write in the dummy template all the possibilities, but it would have to be captured somewhere, so it might as well be in something that <a href="http://xgettext.pl" target="_blank">xgettext.pl</a> can process.<br>

<font color="#888888">
<br>
Ton</font><div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
</div></div></blockquote></div><br></div></div>