Re: [Catalyst] I18N with variables

2010-08-09 Thread Tomas Doran
On 7 Aug 2010, at 01:03, Ton Voon wrote: I can write a Cat advent calendar entry for this if interested. YES! We were happy to take submissions for this years advent as of Jan 1st, so please do so! ;) (Any time before mid december) Cheers t0m

Re: [Catalyst] I18N with variables

2010-08-06 Thread Cosimo Streppone
On Mon, 02 Aug 2010 07:08:04 +0200, Julien Sobrier jul...@sobrier.net wrote: Also, writing [% c.loc(foo) %] does not create an entry in messages.po when running xgettext.pl, like [% c.loc('foo') %] does. To make that work, I think you'd have to actually *run* your templates for all possible

Re: [Catalyst] I18N with variables

2010-08-06 Thread Ben van Staveren
I've more or less given up on it, mostly because there are a few use cases where text needs translated that's not easily passed through c-loc, for example dynamically generated descriptions and such things. They *could* be put through c-loc but that ties some logic too tight to the whole web

Re: [Catalyst] I18N with variables

2010-08-06 Thread Matthias Dietrich
Hi, Am 06.08.2010 um 14:58 schrieb Ben van Staveren: There's also the issue that I'm dealing with now where I have a web shop that I need to build that needs to be fully bilingual. Including product descriptions and names - this makes things interesting because I18N is absolutely useless

Re: [Catalyst] I18N with variables

2010-08-06 Thread Ben van Staveren
Hi Matthias, That's what I considered at some point, but what happens there is that you are more or less totally working around the I18N module at that point. I did some experimenting with a subclass of TT that was actually translation aware and would do it on a much lower level (given that I

Re: [Catalyst] I18N with variables

2010-08-06 Thread Bill Moseley
On Fri, Aug 6, 2010 at 6:16 AM, Matthias Dietrich mdietr...@cpan.orgwrote: I'm using short identifiers for my I18N texts, like Home.Greeting which is then translated to Hi there for en_us or Hallöchen for de_de. When I added a small CMS to a customer's application all texts should also be

Re: [Catalyst] I18N with variables

2010-08-06 Thread Cosimo Streppone
On Fri, 06 Aug 2010 16:57:42 +0200, Bill Moseley mose...@hank.org wrote: I've been arguing with work about how to key our text. So far we continue to use the English in the loc() tags in the templates, and then the I18N team uses a script to pull out this text which gets sent to

Re: [Catalyst] I18N with variables

2010-08-06 Thread Ben van Staveren
Hi Bill, Back in the day (heh) we faced the same problem for an app we were doing for a client, because the client insisted they wanted the ability to do their own translations, we ended up with text keyed on the location where it was called from, and the actual english string. So in a

Re: [Catalyst] I18N with variables

2010-08-06 Thread Matthias Dietrich
Hi Bill, Am 06.08.2010 um 16:57 schrieb Bill Moseley: I've been arguing with work about how to key our text. So far we continue to use the English in the loc() tags in the templates, and then the I18N team uses a script to pull out this text which gets sent to translation services. The

Re: [Catalyst] I18N with variables

2010-08-06 Thread Ton Voon
On 6 Aug 2010, at 15:57, Bill Moseley wrote: I've been arguing with work about how to key our text. So far we continue to use the English in the loc() tags in the templates, and then the I18N team uses a script to pull out this text which gets sent to translation services. For Opsview

Re: [Catalyst] I18N with variables

2010-08-04 Thread Ton Voon
On 2 Aug 2010, at 06:08, Julien Sobrier wrote: Hello, I've started to translate my website using Catalyst::Plugin::I18N. It works fine for static text. Bu I can't make it work for variables. For example, I need to a translation for [% foo %] where for can take a set of values defined in a

Re: [Catalyst] I18N with variables

2010-08-04 Thread Nicholas Wehr
Check out Catalyst::Plugin::Localize::Simple http://search.cpan.org/~wehr/Catalyst-Plugin-Localize-Simple-1.1/lib/Catalyst/Plugin/Localize/Simple.pm 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,

[Catalyst] I18N with variables

2010-08-01 Thread Julien Sobrier
Hello, I've started to translate my website using Catalyst::Plugin::I18N. It works fine for static text. Bu I can't make it work for variables. For example, I need to a translation for [% foo %] where for can take a set of values defined in a database. I'm sot sure what is the best way to