Problem description and current behaviour
Using setLanguage the languageId is not updated.
Context
- calling setLanguage() fires indeed a http request with the correct language id in payload:
{"languageId":"LANGUAGE_ID"}
- The refreshContext() is correctly fetching the context again
Expected Behavior
Changing the language should update languageId in the component.
Steps To Reproduce
Minimal code for reproduction, anywhere in a Nuxt project:
<script setup lang="ts">
const { languageId, setLanguage } = useSessionContext();
</script>
<template>
{{languageId}}
<button @click="setLanguage({ id: 'ENGLISH_ID' })">
Change to English
</button>
<button @click="setLanguage({ id: 'GERMAN_ID' })">
Change to German
</button>
</template>
Anything else?
I am not sure if this is an composables problem or an actual core error.
Problem description and current behaviour
Using
setLanguagethelanguageIdis not updated.Context
{"languageId":"LANGUAGE_ID"}But in the context response is still the old language id
"context": { ... "languageIdChain": ["OLD_lANGUAGE_ID"] ... }Expected Behavior
Changing the language should update
languageIdin the component.Steps To Reproduce
Minimal code for reproduction, anywhere in a Nuxt project:
Anything else?
I am not sure if this is an composables problem or an actual core error.