The JavaScript can't find the elements if it is run before the elements are in the DOM so moving the ECL.autoInit() call to the end of the page makes the language select at least open. Looks like it still doesn't change the languages, but it might be a configuration problem on my instance. It also lists more languages that I selected to be used on my Re3gistry instance which is a bit annoying.
Language selection on the header:
When clicked after the change:
I noticed there's a HTML <select> element for language selection as well on the DOM and some code on a common.js file refers to it by ID, but I can't see where it's actually shown.
Apparently this component package is used to run some JavaScript for creating the language selection etc. This https://github.com/ec-jrc/re3gistry/blob/v2.5.1/sources/Re3gistry2/src/main/webapp/jsp/includes/header.inc.jsp#L32C61-L32C92 basically means that the ECL.autoinit() will try to run this code https://github.com/ec-europa/europa-component-library/blob/v3.12.1/src/implementations/vanilla/components/site-header/site-header.js#L127 and find elements on the page.
The JavaScript can't find the elements if it is run before the elements are in the DOM so moving the ECL.autoInit() call to the end of the page makes the language select at least open. Looks like it still doesn't change the languages, but it might be a configuration problem on my instance. It also lists more languages that I selected to be used on my Re3gistry instance which is a bit annoying.
Language selection on the header:![image](https://github.com/ec-jrc/re3gistry/assets/2210335/f026b9dd-8ca4-4c9a-a6ca-cc91aec8ec2c)
When clicked after the change:![image](https://github.com/ec-jrc/re3gistry/assets/2210335/bcce8a79-5cad-4254-88d5-088a58b911b4)
I noticed there's a HTML
<select>
element for language selection as well on the DOM and some code on a common.js file refers to it by ID, but I can't see where it's actually shown.