[Catalyst] I18N with variables

Matthias Dietrich mdietrich at cpan.org
Fri Aug 6 16:33:08 GMT 2010


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 risk is text gets into the templates that for some reason does not get pulled out.

yes, that's an issue with my solution, too.  You code and add texts and if you don't add them immediately to the database you may get lost.  Especially when you have code with I18N text that only gets called in some special circumstances that you can hardly simulate, so your text stays as a key (or english text) until someone stumbles upon this special case and reports.

> I've been arguing for a system where we use some kind of ID for the keys.  I'm not so sure the key format matters -- could be just a primary key in the db, for example.  This could be a stage done by the designers so the design spec just indicates a message id.  Then code development and translation can happen at the same time.

Using an integer ID doesn't sound useful to me.  An ID doesn't say anything about what it should be replaced with, a key does (should).  My keys also have arguments like "Home.Greeting[_1]" which could be translated to "Hello [_1]".

A disadvantage of using english as identifier is: when you change the text, say you have a typo in it, you need to change all you translations so they have the correct identifier again.  If you have a key (or integer ID), changing the typo is easy because there is a additional translation and typos in your keys are irrelevant.

> So, I'd like to hear about your translation workflow and any tools you are using.

My tools were pgAdmin3 and some AutoCRUD until now, because there has not been any "big" translation.  In a project at my former employer we wrote a small Excel import script because the customer translated every text with Excel.  There's no magic here that could help you, sorry.

Thanks,
  Matthias

-- 
rainboxx Software Engineering
Matthias Dietrich

rainboxx Matthias Dietrich   |  Phone: +49 7141 / 2 39 14 71
Königsallee 43               |  Fax  : +49 3222 / 1 47 63 00 
71638 Ludwigsburg            |  Mobil: +49  151 / 50 60 78 64
                             |  WWW  :  http://www.rainboxx.de

CPAN: http://search.cpan.org/~mdietrich/
XING: https://www.xing.com/profile/Matthias_Dietrich18
GULP: http://www.gulp.de/profil/rainboxx.html







More information about the Catalyst mailing list