I now have a python script that adds (some) language tags to resources in a Canvas course room. You can find the script language_tag_a_course.py at https://github.com/gqmaguirejr/Canvas-tools . Currently, the script processes the published Pages, Syllabus, Assignments, and (classic) Quizzes. As usual, if you update a quiz, you will get a warning when you view the quiz that states that students will not see the updated quiz until you save it. Just click on the save button.
Note that I only added the lang attribute to top-level elements of the content and I do not add this attribute if one already exists (so if someone has already specified the lang attribute, I do not overwrite it). This also means that you can run the script repeatedly and it will not perform updates when there is nothing to change. Additionally, note that the page heading generated by Canvas before the contents of a page is included is not language tagged. Thus for a wikipage you will get:
<div class="show-content user_content clearfix enhanced" data-resource-type="wiki_page.body" data-resource-id="104962" data-lti-page-content="true">
<h1 class="page-title"> ...
However, I think this tagging goes a long way toward avoiding the need to set a course-specific language and thus unnecessarily blocking users from using their choice of language for the GUI. Hopefully, it will improve the accessibility of the course material for users.
As it seems the API for updating new quizzes is still not finished, I will not try to do anything with them.
A special thanks to @albertSol for his posting https://community.canvaslms.com/t5/Canvas-Developers-Group/Canvas-API-call-to-update-an-existing-qui... -- this provided the information that I needed to complete the update for a classic quiz question with answers.
Next, I will look at Discussions and Announcements.
----------
Some things that could be improved:
If you use the class "enhanceable_content tabs" for multiple language presentation, you have to manually add the tags:
<div class="enhanceable_content tabs">
<ul>
<li lang="sv"><a href="#fragment-1">Svenska</a></li>
<li lang="en"><a href="#fragment-2">English</a></li>
</ul>
<div id="fragment-1" lang="sv">
and later
<div id="fragment-2" lang="en">
It is still left to the user to language tag parts of the page that are in a language other than the one they have specified to be applied to the top-level elements.