i want to retrieve the language of the translated page for the template to get a similar menu structure in a different language but subpagename gets the whole page title - how could i fix/workaround this?
Topic on Extension talk:Translate
{{#translation:}} or {{pagelang}} may help you.
these arent magic words? they link to empty templates in my mw
i did a workaround with regex extension:
{ {#regex:{ {PAGENAME}}|%^.*(/.*)$%|$1}}
still appreciate "cleaner" solutions
I recommend using #titleparts magic word from Extension:ParserFunctions. The reason why {{subpagename}} does not work is that it it depends on the $wgNamespacesWithSubpages configuration setting, which is not set to true for pages in the main namespace.