Skip to content

Language picker fixes

Ján Juhár requested to merge language-picker-fixes into master

This MR fixes several issues with the language picker widget:

  • previous implementation did not consider any URL prefix when the course is deployed. This is fixed by adding custom meta tag it4kt-root-url to each page header that contains URL relative to the index page. The value of meta tag is used in computation of destination URL for different languages.
  • changing language always replaced browser's history entry, causing unexpected behaviour when user changed language explicitly. This is fixed by using window.location.replace() only for automatic language change (based on lang. stored in local storage). For explicit language change the window.location.assign() method is used.
  • language icons used in language picker used "absolute" urls from the server's root. "Relative" urls are now used there.
Edited by Ján Juhár

Merge request reports