feat: update language setting code to prioritize session language when available#1032
feat: update language setting code to prioritize session language when available#1032jpagh wants to merge 3 commits intoSuffolkLITLab:mainfrom
Conversation
BryceStevenWilley
left a comment
There was a problem hiding this comment.
These together allows individual users to have a language selection that is unique to their session and doesn't change the interview-wide al_user_language.
I think I need some more explanation of why a user would want this behavior, and why it should be the default. Is it when a user and an advocate are sharing a session, both filling out answers back and forth?
Assuming @nonprofittechy knows more about this use case.
…e session-local language setting
|
@BryceStevenWilley You're right, this was based on a discussion with @nonprofittechy and the desire to upstream this change into AL which would keep our The use case is particularly multi-user interviews where the users need different languages at the same time, as this ensures that each user's preferred language is applied to only the screens that they see, even when the users are simultaneously using the interview. |
@BryceStevenWilley yes, I suggested Jack make this change upstream for code we'll probably share back to AL core to handle multiple signers in an arbitrary order. Each signer might have their own unique language, and if they're both operating on the interview at the same time, without this, you get a situation where the language changes for the opposing user. This fits best upstream because language changes need to happen in an initial block. Docassemble doesn't handle multiple The other option would be to turn off the existing AL initial block altogether and maintain our own for this interview, but I think this could be helpful for any multiuser interview, whether just advocate/client or multiple signers. |
As discussed with @nonprofittechy , this commit (9c6a08c) checks the
session_localspecial variable for a language value before checking the interview-wideal_user_language.This commit (73d3eae) updates the event that the language dropdown calls so that the user's chosen language is stored in the
session_local.These together allows individual users to have a language selection that is unique to their session and doesn't change the interview-wide
al_user_language.If an interview is sent via URL then that still changes the interview-wide
al_user_language.