https://supertokens.com/ logo
Localisation with email verification
b

beestreams

05/17/2023, 7:32 PM
How can we handle localisation with email verification?
n

nkshah2

05/18/2023, 4:43 AM
Hey @beestreams Can you elaborate on what you want to do?
r

rp

05/18/2023, 6:19 AM
hey @beestreams you can do this by overriding the sendEmail function in the emailDelivery config of the emailverification recipe to send emails by yourself. Here you get to also control the contents of what you send.
b

beestreams

05/19/2023, 7:12 AM
Sure, so we will probably have signups in multiple countries, so just a question about how dynamic that would be.
r

rp

05/19/2023, 7:24 AM
Yea. You could get the IP from the request header for example and based on that determine the language to use.
Or you could pass in the lang preference from the frontend’s pre api hook to the backend and then read that from the request object