On Wed, Sep 18, 2002 at 04:46:34PM +1200, Finlay Thompson wrote:
Each script shouild have the following template selecting line:
my $template = gettemplate("opac-main.tmpl", "opac");
for example where the template is opac-main.tmpl
Could this be abstracted? That is, hide it in a module somewhere, and just have each script use use Koha::CGI; or some such. Then the line above can just go in Koha/CGI.pm. Then there's less code to maintain in each individual script. In addition, if the template name is just the name of the script with "pl" replaced by "tmpl", it can make an educated guess as to the template name.
All of these settings will can be space seperated (maybe they should be comma seperated?) lists: like "sp fr en" for language. And it will search in that order.
A word of caution: one thing that I learned on another project is that translations are never up to date. I suspect this is especially true of images. Hence, anything that involves i18n will need to fail gracefully. If you show the original English text to a French speaker, that's not good, but it's better than showing nothing at all (or even a misleading French message). Hence, the code that picks the appropriate language-specific files ought to pick the English file if it can't find the correct one. Now that I think about it, I suspect the same thing applies to themes: if the selected theme isn't complete, the file-picker should probably default to using the appropriate file from the default theme.
There will be no cookies!
Yay! -- Andrew Arensburger This message *does* represent the arensb@ooblick.com views of ooblick.com When in Rome... romance!