On Tue, Apr 7, 2009 at 4:16 PM, Howard Ashreed <[email protected]> wrote:
> If anybody is able to help I have one other question. As I said, we're > trying to translate our website into other languages and make it easier for > volunteers to do the translations without having to read over lots of > template code. > > We have split out all translateable text strings into BLOCKS, which > commence below the named according to a somewhat uniform naming convention > (starting with '_txt_'). At this point we can use sed or similar to easily > extract all these blocks and dump them in an email to the translator - the > tricky part potentially comes with re-combining the new translations (unless > one does it by hand). > > My idea is to split each template into both a layout file and a 'strings' > file. Basically, all the _txt_ blocks for a given template becoming the > 'strings' and being cut out of the file and saved into another > directory/file with a name which derived from the requested template. > > One way to make this work would be by modifying each template to PROCESS > template.name_strings but this would require modifying every single > template. Another way might be to always process() a single generic > 'wrapper' template, passing it some variables including the template name, > from which it would derive the filename of the translations/strings file. > Neither of these are appealing to our IT team, so I was wondering if there > was another way to combine the 'layout' templates with the text strings > files? > I'd love to help, but I haven't done much i18n in my career, and your problem statement still seems rather abstract to me. Can you give a concrete example of what inputs you have and what output you want? --Sean
_______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
