catalyst / moodle-auth_outage

Planned, graduated user and admin friendly moodle outages
https://moodle.org/plugins/auth_outage
17 stars 32 forks source link

Multi-Language Content (v2) should be supported #296

Open klorinczi opened 2 years ago

klorinczi commented 2 years ago

Multi-Language Content (v2) should be supported https://moodle.org/plugins/filter_multilang2

The {mlang en}content in English{mlang} should be supported.

danmarsden commented 2 years ago

Thanks for the suggestion.

I suspect adding a format_text call around the $html here might do that: https://github.com/catalyst/moodle-auth_outage/blob/MOODLE_39_STABLE/classes/output/renderer.php#L78 we'd probably want to pass 'noclean' and maybe even send the systemcontext id rather than allowing it to use page context..

Feel free to submit a PR for us to take a look/test.

thanks!

brendanheywood commented 2 years ago

This will be a lot more involved. The outage pages are essentially static html and cannot use internal moodle apis during an outage, so we would have to pre-bake N versions of all the pages for each language which are installed and also do some http header based content negotiation to show each user the right language. We will not have their session either so it can only be based off what their browser is sending and not what they would have selected inside moodle. It's all possible but just not trivial.