To tag various elements outside of blocks to a foreign language in CourseArc, you can enter HTML code in the footer code field in the Course Settings or as HTML blocks on the page.
The following table shows sample code for changing the language tagged to different parts of the page. In the following examples, you will want to replace the bolded language code of "es" with the language code for the desired language.
Part of Page | Sample Code (shown with ES for Spanish) | Alternative Description |
---|---|---|
1 Lesson Title | <script> $(document).ready(function() { $('h1').attr('lang', 'es'); }); </script> | Lesson title which is a heading level 1 |
2 Page Title | <script> $(document).ready(function() { $('h2').attr('lang', 'es'); }); </script> | Page title which is heading level 2 |
3 Heading Lines | <script> $(document).ready(function() { $('.heading').attr('lang', 'es'); }); </script> | Lines 1 and 2 in the heading near the logo at the top of the page |
4 Navigation | <script> $(document).ready(function() { $('nav li, .ccm-next-previous-wrapper .name').attr('lang', 'es'); }); </script> | Main navigation and forward/back navigation |
5 Footer | <script> $(document).ready(function() { $('footer').attr('lang', 'es'); }); </script> | Footer at the end of the page |
To tag a language to content in blocks on the page, see the following article.