It is clear from the previous question and our own experiments, that the user_metadata is not preset and available when crafting the verification email. We have also tried to set it in a rule, but again it is clear that this rule is run too late and the metadata is not available when sending the email.
We have however, been able to use a prehook to hardcode the locale on the user_metadata but as the previous poster mentioned the request query is not available at this point.
The obvious field to use would be the requestLanguage field as shown when editing a prehook, @param {string} context.requestLanguage - language of the client agent
However this is empty for us and we have not been able to find any information about how to set it.
Can someone please point me in the right direction? I believe that if we can set this context field our flow will work and we will be able to send users emails in the correct language.