#Sendgrid localization, how it works?

1 messages · Page 1 of 1 (latest)

bronze kiln
#

How is actually working the localization with sendgrid?

If i want to subscribe an event, for example customer password reset doesnt have fields in order to choose wich locale will be used to send the email with the correct template.

How can i decide if i want to send my email using for example the german template?

I know there is a medusa-config section to place the id of your template but when will be called? who decide which locale will use the current email?

Thank you

upbeat bobcat
bronze kiln
#

thank you for your quick help kosek!

that code seems to be planned for orders, like new order place etc, but what will happen with the reset password? 😦 there is a way to choose the locale manual? based in a request and gathering the browser data for example

upbeat bobcat
#

🤔

#

I don't know 🙂

bronze kiln
#

Good, i was investigating the source code of the plugin.

#

For everyone who wants to do it, just add the "locale" field to the data when you call the event bus

cobalt tendon
#

Sorry to bring up an old discussion but I was asking myself the same thing, the cart.context should be passed from frontend to backend in some way? Because if I do {cart} = useCart() in checkout in the context I don't see any locale field

cobalt tendon
#

little bump

tulip plaza
#

Hi @cobalt tendon , were you able to figure this out? Have the same issue

cobalt tendon
#

no sadly not

tulip plaza
# cobalt tendon no sadly not

ah I see - did you use another method to apply sendgrid localization then? or if you didn't use sendgrid in the end, how did you apply the localization? still not sure about what to do

tulip plaza
# bronze kiln

hi @bronze kiln sorry to bring up old discussion - is this how to add the locale to cart.context.locale? i have been stuck on this part for awhile. all the other SendGrid stuff works for me except for localization