Re: Translatable text in tag attributes
| Newsgroups | gmane.comp.cms.xaraya.devel |
|---|---|
| Organization | Xaraya |
| Message-ID | <[email protected]> |
Jason wrote: > Would something like this be feasible: > > <input type="submit" value="Log In" /> > > <input type="submit"> > <xar:attr name="value">Log In</xar:attr> > </input> Yes. The BL2 compiler already has a <xar:attribute> tag thanks to Marcel, but for reasons I've never been able to pin down it seems quite delicate. You can see it in action in the com.xaraya.core.unstable.tableddl scenario. I'm less drawn to that form because it opens a new issue: whether or not any tag that would have one or more translatable attributes would have an open form > > The BL compiler would do the hard work of modifying the elements and attributes, > but I'm not sure if the translation module would make use of these capabilities > of the compiler? I didn't mention the translations module, or more generally any translator that would use the current Xaraya scheme, because both such a module and the compiler essentially have to do the same thing: traverse the template doc tree and pick out things that need translating. The former to populate the locale XML files with tokens and their translations, and the latter to determine which tokens to look up in those files. At least under the current scheme I'm assuming that if we solve the issue in theory we can apply the solution to the translator as well as the compiler.