Closed CelineTrammi closed 3 weeks ago
Transfering this to frontend, as they need to implement an empty patch to inform backend that language has changed. This has been discussed previously but probably not implemented.
It seems like the language gets stuck to whatever was selected first. If I have en
selected when opening the page, it will send patch requests with language=en
. If I then switch using the language selector to nb
it will still send patch requests with language=en
. I can see that we generate the url once, and then store it for future use. This was probably done since the url differs between regular and stateless apps, but this also includes the language parameter.
Description of the bug
This might be a feature request also, dependent on the motivations behind adding
string language
to DataProcessor in https://github.com/Altinn/app-lib-dotnet/pull/405.As this issue (https://github.com/Altinn/app-lib-dotnet/issues/16) mentions, the backend should be informed of language changes. For DataProcessor and FormDataValidator, the methods now include a string for language in v8.
However, when a user selects a different language then the one they initiated the app with, the
language
field does not change in DataProcessor and FormDataValidator.Is there a way to synchronize these? Or are we using lanuageSelector wrong?
Steps To Reproduce
"uiSettings": { "showLanguageSelector": true }
inlayout-sets.json
DataProcessor.ProcessDataWrite()
, set a breakpoint or display thelanguage
param and compare before and after changing the languageAdditional Information
No response