[Catalyst] I18N with variables
Ben van Staveren
benvanstaveren at gmail.com
Fri Aug 6 13:52:03 GMT 2010
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
use TT for the web-facing end of the app, as well as for emails,
generated files on disk, and even use it to an extend to generate
Matthias Dietrich wrote:
> 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 for it, so I'm building a set of modules that attempt to solve the whole problem gracefully; perhaps something to stick on CPAN at some point.
> 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 translated. So I saved any text to I18N key CMS.NavigationPoint.PageKey.* within the right language "file" (actually I'm using C::P::I18N::DBI), * for "Title" or "Content" or similar.
> I think it should be possible to handle product descriptions like this. In your Backend save every text to Product.$ArticleNumber.Description, Product.$ArticleNumber.Name, Product.$ArticleNumber.Variant and so on where $ArticleNumber is the actual article number. The possible languages should be somewhere in your Catalyst config.
Ben van Staveren
phone: +62 81 70777529
email: benvanstaveren at gmail.com
More information about the Catalyst