Skip to content
Snippets Groups Projects

Add JS to redirect based on browser's language

This JavaScript checks the visitor's language settings. Based on that, it redirects to the translated version of the website. The following tests were made:

  • visit the main page with the browser set to English, it stays on the primary page that is in English
  • visit the main page with the browser set to Russian, the website redirects to /ru/
  • visit the main page with the browser set to Thai, not translated yet, it doesn't redirect

In order to be able to visit the English version of the website with a non-English browser, make the website also available under /en/

Closes: #103

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading