In the Balinese palm-leaf manuscript stuff I'm currently working on for Wikisource, the Balinese community wants each page of text in Balinese script to contain a Latin transliteration below it. (Think of it like a scholarly edition.) I'm preparing a patch to core that will add a parser function to generate transliterations, so for example {{#transliterate:ban-bali|ban-latn|ᬯᬬᬦ᭄}} will return wayan. What I'd like is for the transliteration appear similarly to this page on Palmleaf.org. As far as I can tell, this requires modifying ProofreadPage to do properly.
What I propose is to add support for a template MediaWiki:Proofreadpage_body_template. Then, in PageContent::getParserOutput, it will check if the template has been defined and if so, wrap the page body with it in the output. It will also pass in a lang parameter in order to permit conditional output depending on the language. This will allow Palmleaf.org style output with a template like this:
{{#ifeq: {{{lang}}} | ban-bali | {{{1}}} ==== Auto-transliteration ==== {{#transliterate: ban-bali | ban-latn | {{{1}}} }} | {{{1}}} }}
What do people think of this idea? I already have a patch ready that seems to work. It's only a few lines. There would be alternative ways to do it, but I like the template method because it leaves the formatting entirely up to the wiki administrator. For example, you could do <pre>{{{1}}}</pre> instead, display the two versions side by side, etc.