Skip to content

six-language-switcher with SixLanguageSwitcherInput[] renders key and emits value #573

Description

@stsemmler

Six Webcomponents version

5

Steps to reproduce

Create a six-language-switcher with custom languages of type SixLanguageSwitcherInput[].
Example taken from https://six-group.github.io/six-webcomponents/v5/components/six-language-switcher.html#custom-output

<div style="margin-top: 1rem">
  <span style="font-weight: bold">selected language: </span><span id="selected-language-custom-output">nothing selected</span>
</div>
<script type="module">
  const languageSwitcher = document.getElementById('custom-output');
  const selectedLanguage = document.getElementById('selected-language-custom-output');
  languageSwitcher.languages = [
    { key: 'FR', value: 'French' },
    { key: 'IT', value: 'Italian' },
    { key: 'DE', value: 'German' },
  ];
  languageSwitcher.addEventListener('six-language-switcher-change', (event) => {
    const { detail } = event;
    selectedLanguage.innerText = detail;
  });
</script>

What is expected?

  • Should render "French"
  • Should emit event with "FR"

What is actually happening?

  • Renders "FR"
  • Emits event with "French"

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (22) x64 Intel(R) Core(TM) Ultra 7 165H
    Memory: 24.71 GB / 63.43 GB
  Binaries:
    Node: 24.16.0 - C:\develop\bin\node24\node.EXE
    npm: 11.13.0 - C:\develop\bin\node24\npm.CMD
  Browsers:
    Chrome: 152.0.7977.55
    Edge: Chromium (151.0.4129.101)
    Firefox: 154.0 - C:\Program Files\Mozilla Firefox\firefox.exe
    Internet Explorer: 11.0.26100.8115

Any additional comments?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions