|
From: James M. <jm...@tr...> - 2004-07-22 16:54:30
|
At approximately Wed, Jul 21, 2004 at 06:58:52AM -0400, Shane wrote:
...
>
> One of the PITA things about Slash, for me (IMHO), has always been the
> language inside the stock theme's templates.
>
...
> If more text/language was only shown through the getData command, it
> might have the added benefit of making internationalizing a slash
> site's text easier. Because instead of changing a ton of templates,
> you're changing the language in the data* templates (I think there may
> be error* template(s) too, I may be wrong).
>
> Any thoughts?
>
Seems like a good idea. I can think of two areas of concern. One is
performance---if you look up each bit of text, how much extra
processing has to be done? Second, modularization is always good in
theory, but it takes a lot of work. That's a big up front cost for
the Slashcode team to pay for not much benefit for them, as they don't
change the language of their templates.
As to implementation, I have another suggestion. Instead of calling
the get data template with
> Slash.getData('loginform_err2')
Could there be one text template per one layout template, that defined
variables filled with text? Hmm, make that two. So at the top of
each (layout) template, there is one line that loads "stock" language
template, and a second one that loads "custom" language template, like
foo is [% foo %] is undefined?
[% PROCESS "language_$template_stock" %]
foo is [% foo %], defined in stock
[% PROCESS "language_$template_custom" %]
foo is [% foo %], if defined in custom it overrides stock
Custom language is empty by default, but is where you would put your
text bits that override the default.
james
|