Last modified: 2009-04-30 01:48:57 UTC
A parser function to query the name of enclosing sections like {{#section-name:<section level>}} would allow a template to make references to the talk page or to create new sections on other pages depending on the name of the enclosing section (assuming the functionality requested in Bug #Bug 9239)
Kind of tricky to implement at present, due to the way we store sections. In particular, parser- hook functions of any sort don't have access to the rendered section titles, due to the multipass parser. Such a function would have to be treated specially somehow, like add some kind of dummy unique tag that could be replaced in a later pass. (And, of course, recursion would probably have to be special-cased, e.g., ==Foo{{sectionname}}bar== would probably need to be treated as literal.)
You gave the answer yourself. Make it the section name as present in the input, with no translations applied. You could, of course, offer another parser function capable to apply the required translations ;-) Nicely bizarre.
*** This bug has been marked as a duplicate of bug 1605 ***