Use the language markup bookmarklet to make content in multiple languages accessible
Following are instructions for setting up and using the Language Markup Bookmarklet in Canvas and Pressbooks. This tool helps create accessible content by using HTML markup to indicate the human language of text used on a web page. Language markup helps ensure that special characters and scripts display correctly on the page, and that assistive technologies (such as text-to-speech software and screen readers) can accurately pronounce the text.
A bookmarklet is a piece of code that is placed in a bookmark's URL so that when you activate the bookmark, instead of going to a new site, the code is activated on the current page.
Install the bookmarklet using a mouse
Press Ctrl+Shift+B or Shift+Command+B to show the Bookmarks Bar if it is hidden.
Drag this bookmarklet link: Edit Language Markup from the page to your Bookmarks Bar. It should appear on the toolbar.
To rename it, right click and choose Edit or Rename.
Install the bookmarklet using a keyboard
Copy the following code exactly as shown below, then follow the instructions for your browser and operating system.
Press Ctrl+Shift+B to show the Bookmarks Bar if it is hidden.
Press Ctrl+D to bookmark this page to the Bookmarks Bar.
Press Ctrl+Shift+O to open the Bookmark Manager.
Navigate to the bookmark created in step 2.
Press Shift+F10, or the context menu key, and select Edit.
Change the name as desired.
Replace the URL with the code copied above.
Press Enter to save it.
Press Ctrl+Shift+B to show the Bookmarks Bar if it is hidden.
Tab to the bookmarklet link under Install the bookmarklet using a mouse.
Press Shift+F10, or press the context menu key, to open the context menu.
Navigate to "Bookmark Link..." and press Enter.
Edit the name if desired, then press Enter to save the bookmarklet.
Open the Bookmarks page by entering "chrome://bookmarks" in the address bar or press Option+Command+B.
Navigate to and activate the first vertical three-dots ("Organize") button.
Select "Add new bookmark" from the menu that appears.
Name the bookmark as desired.
Paste the code copied above as the URL.
Press Enter to save the bookmark.
Open the Favorites page by entering "edge://favorites" in the address bar.
Navigate to and activate the "Add favorite" button.
Name the bookmark as desired.
Paste the copied above as the URL.
Press Enter to save the bookmark.
Press Command+D to bookmark this page to the Bookmarks Bar.
Press Shift+Command+O to open the Bookmark Manager/Library.
Use the tab and arrow keys to navigate to the bookmark created in step 1.
Tab to the Name field and change the name as desired.
Tab to the URL field and replace the value with the code copied above.
Press Enter to save it.
Safari doesn't appear to offer any practical keyboard-based method for installing bookmarklets.
Activate the bookmarklet
You can activate the Language Markup Ribbon from any page with an open Canvas Rich Content Editor or Pressbooks page editor by selecting the bookmarklet in your browser's bookmarks toolbar. The ribbon will appear near the top of the RCE and looks like this:
Set the default language
The default language is the language that will be applied to any unmarked text on the page. Setting the default language ensures that any unmarked text will be pronounced correctly. The default language only needs to be applied once to each page.
To set the default language:
In the Language Markup Ribbon, select Set default lang.
In the pop-up that appears, select your default language for the page, and then select OK.
When you are finished making changes, save your work by selecting Save in the page editor.
Note: If you cannot find the language or dialect that you are seeking, the default language tag will need to be entered manually. See the IANA Language Subtag Registry for the authoritative list of all valid language subtags according to BCP 47 (Best Current Practice 47). See Choosing a Language Tag - www.w3.org for guidance on determining the correct language tag and subtag.
Mark the language of a text passage
To mark text as a certain language:
In the page editor, highlight the text you want to markup.
In the Language Markup Ribbon, select the appropriate language button. If the language you need isn't displayed, see Configure language buttons below to learn how to add it.
The markup will be inserted. To see the markup, in the Language Markup Ribbon, select View lang markup; to stop displaying the markup, select View lang markup again.
When you are finished, save your work by selecting Save in the page editor.
Configure language buttons
You can select which language buttons are displayed on the Language Markup toolbar, but you must reconfigure these each time you open the page editor.
To choose your languages:
In the Language Markup Ribbon, select the double question mark (??) button.
Select the language you need from the drop-down, and then select OK. The abbreviation for the language will display in the ribbon.
When you are finished, save your work by selecting Save in the page editor.
Note: If you cannot find the language or dialect that you are seeking, the default language tag will need to be entered manually. See the IANA Language Subtag Registry for the authoritative list of all valid language subtags according to BCP 47 (Best Current Practice 47). See Choosing a Language Tag - www.w3.org for guidance on determining the correct language tag and subtag.
Show language markup
To proofread and edit the language markup, select View lang markup in the Language Markup Ribbon. Language markup will be displayed in the page editor; each language will be displayed in the format [lang]marked_text[/lang]. Default language markup will appear at the beginning and end of page content. To stop displaying the markup, select View lang markup again. (This does not remove the markup that has been applied).
Remove language markup
You can remove language markup from specific text or from the entire page:
To remove markup from specific text, in the page editor, place your cursor inside the marked up text (you do not need to highlight the text in the markup), and then, in the Language Markup Ribbon, select Remove Current Lang. The markup will be removed; you can inspect this change by displaying the language markup or by viewing the tags in the HTML editor.
To remove all language markup from the entire page, in the Language Markup Ribbon, select Remove All Lang Markup, and then, when prompted to confirm removal of all language markup from the document, select OK. All markup will be removed from the document; you can inspect this change by displaying the language markup or by viewing the tags in the HTML editor.
When you are finished making changes, save your work by selecting Save in the page editor.