How to detect customer's language in order

How to detect customer's language in order

rahulchd891
Tourist
8 0 2

Hi, 

My store has two locales - English and French. Once an order is made by a customer, we would like to find out whether the customer shopped in English or French, ideally somewhere in the order such as in the notes. I am not sure where to add the code "{% request.locale.name %}" as I cannot control the checkout. Normally, the locale would appear in the "Notes" of the order.

Replies 4 (4)

CandJ
Tourist
13 0 1

Hi there,

Did you happen to find out how to do this? We are also looking for this information.

Thank you so much in advance for your answer!

rahulchd891
Tourist
8 0 2

Hi, 

I haven't found a direct result. However, what I ended up doing is adding the Shopify code {{ request.locale.name }} next to the cart note code within the template "cart". This is shown below. So in the front end, the customer will see the language name in their cart note (which they can delete), and that note I can access in the order notes.

{{request.locale.name }} {{ cart.note }}

 

CandJ
Tourist
13 0 1
Thank you for letting us know!
kiwi8
Shopify Partner
15 0 3

Hi, is there an update? is there a better solution until today?