How to exchange Wikitext (as seen in Witkionary sourcecode) into readable text (as seen in Wiktionary website).
So this source:
{{ru-verb|ходи́ть|impf|pf=сходи́ть}}
Should be seen as:
ходи́ть • (xodítʹ) impf (perfective сходи́ть)
It is called Template in Wikitext, but how to change that template into human readable text I cannot find in the documentation.
Anyone had similar problem before?
Use the parse API to get an HTML output.
You can render the HTML by passing it to your browser...
I don't think MediaWiki can directly generate plain text output, but If that's what desired, one may use a third party library. In Python and using Beautiful Soup and its
get_textmethod the code looks like this:Update:
Use
strip_tagsandhtml_entity_decodefunctions in PHP: