diff --git a/assets/controllers/turbo/locale_menu_controller.js b/assets/controllers/turbo/locale_menu_controller.js new file mode 100644 index 00000000..1b2b34a5 --- /dev/null +++ b/assets/controllers/turbo/locale_menu_controller.js @@ -0,0 +1,8 @@ +import { Controller } from '@hotwired/stimulus'; + +export default class extends Controller { + connect() { + const menu = document.getElementById('locale-select-menu'); + menu.innerHTML = this.element.innerHTML; + } +} \ No newline at end of file diff --git a/templates/_navbar.html.twig b/templates/_navbar.html.twig index f6b1fa3c..22173dfe 100644 --- a/templates/_navbar.html.twig +++ b/templates/_navbar.html.twig @@ -52,11 +52,13 @@