li.nav-item.dropdown
  a.nav-link.dropdown-toggle.mx-3 data-toggle='dropdown' href='#'
    = t("locales.#{I18n.locale}")
    span.caret
  ul.dropdown-menu.p-0.mt-1 role='menu'
    - I18n.available_locales.sort_by { |locale| t("locales.#{locale}") }.each do |locale|
      li = link_to(t("locales.#{locale}"), url_for(params.permit!.merge(locale: locale)), class: 'dropdown-item')

li.nav-item.dropdown
  a.nav-link.dropdown-toggle.mx-3 data-toggle='dropdown' href='#'
    = t("locales.#{I18n.locale}")
    span.caret
  ul.dropdown-menu.p-0.mt-1 role='menu'
    - I18n.available_locales.sort_by { |locale| t("locales.#{locale}") }.each do |locale|
      li = link_to(t("locales.#{locale}"), url_for(params.permit!.merge(locale: locale)), 'data-turbolinks' => "false", class: 'dropdown-item')

Disable turbolinks when switching the language.
Disable turbolinks when switching the language.

This is required as code within the ACE editor would get duplicated if the switch forces a full pageload otherwise.

openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean