Toggling between two languages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my continuing quest to be able to support English and Swedish as parallel languages in Canvas, I decided to add a new Global Navigation menu item to switch (toggle) between the two the first version can be seen in the code (add_language_global_nav_item.js) and document (Better_language_support.docx) at https://github.com/gqmaguirejr/E-learning
Basically, it turns out to be very easy to do:
1. understand how to add custom Javascript to a Canvas instance
2. understand the ENV variable as an environment variable
3. get the user' current locale
4. set the user's locale
Next is to toggle which language's content is shown on a page with parallel language content.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code has been updated to also automatically click on all of the tabs for the material in the selected UI language that are presented on a page using the deprecated jQueryUI tab mechanism. The code and document have both been updated at the github (shown earlier).