Eugene Lazutkin wrote: > Just a thought. > > Isn't it possible to implement layout (structure) and text in separate > templates? One template defines layout and blocks, another one extends the > former and populates blocks with translated text and/or proper i18n tags. > The idea is to have several "translation" templates, which extend one > "layout" template. I know it is a verbose approach, but it doesn't break > anything, and doesn't go against DRY. > > Thanks, > > Eugene > I thought about this before and it is technically possible.
The problem with this is that writing the initial template becomes a nightmare. You have to come up with a block id for every message that you are certain is not used by any other template that you inherit from or include. This is the "technical message id" problem that makes gettext so attractive as it uses the source language string. Also I'm not sure if the current implementation of blocks and inheritance would perform well with this usage. It would also allow translators to use random tags, I'm not sure this is sensible : translators should be translating strings.