Forum OpenACS Development: Response to Migrating ecommerce templates to ATS

Collapse
Posted by Don Baccus on
I think you can just migrate your template pages to the ATS and ignore the multilingual hooks in the old ACS 3 templating system (the "ETS" was later used elsewhere in the toolkit).

The ECommerce datamodel doesn't support multilingual product descriptions, etc, right?  So even if you had static translated templates your product descriptions, shopping cart summary, etc would all be in one language.  You could support (say) a French e-commerce site using the ETS but it wouldn't really provide support for a multilingual e-commerce site.

We really do need to attack the multilingual support problem at some point.  acs-lang provides support for multilingual dynamic messages and these can be used to build language-specific pages, but hitting the db for every page segment's not a great idea.

Lars Pind and I are doing some work on Greenpeace International's forthcoming multilingual/multinational website.  The design we've inherited allows for custom national templates organized in the filesystem in a way that's similar in principle (not details) to the ACS 3 method of specifying plain/fancy or specific language templates.

The correct template is found by a slightly modified version of ad_return_template.

Within the national templates messages are translated using a slightly modified versino of acs-lang.  The advantage of taking this approach is that a UI can be provided that allows translators to work in a controlled fashion (rather than have them translate templates with the risk of their messing them up unintentionally).

This work has caused me to think a bit about how it might be generalized.  The change to ad_return_template required to support mapping to different templates based on context (language in your case, national organization in greenpeace's case) is simple for any given case.  Perhaps in the future ad_return_template could support a simple contract-based interface to a "template mapper" that one could customize?

Also it would be nice if we had standardized translations of toolkit templates available and a way to map them set up!  That's a very ambitious idea (there are a lot of template pages) but it would be damned cool to select a language at install time and have the "Congratulations" and "package manager" and other standard packages come up in the language of one's choice!