How can I automatically set customer language based on browser settings?

How can I automatically set customer language based on browser settings?

brice514
Tourist
10 0 11

Hi!

 

My store runs with 2 languages, English (Default) and French.

Notifications (order confirmations, account activation, etc.) are sent to my customers depending on what's set up in their customer profile.

By default, everybody receives their notifications in English but if I want a French customer to receive it in French, I have to manually go to his profile, go to "edit", and change manually the language to "French".

Capture d’écran, le 2022-07-15 à 11.11.24.png

Is there a way to have it done automatically, based on the browser's language or anything else?

Thanks!

Replies 13 (13)

A-Spice-Affair
Tourist
3 0 2

We have the same exact issue. How can we have customers automatically choose their notification/communication language preference within their customer account page?
We have created a language selector for them with our developers, but unable to have the settings change in the Shopify backend. 
Here's the flow:
1- Client signs up or logs in
2- Client has a Preferred language option in his account page (not the same as the language selector for the whole website) (successfully accomplished)
3- Client changes the preferred language from English to French

4- Website language changes to French (successfully accomplished)

5- The customer's default notification language should change in the backend of Shopify in his customer profile (as per Brice514's picture above)

Screen Shot 2022-10-26 at 2.10.43 PM.pngScreen Shot 2022-10-26 at 2.09.29 PM.png

Can someone please help?

andreasekman
New Member
4 0 0

I have the exact same problem. Did you find any solution for this?

Even if I manually go in on a Customer and change their default notification language it goes back to English (Default) when a new notification email is sent.

brice514
Tourist
10 0 11

I'm regularly checking for solutions because the process is still painfully manually to this day. I have no answer so far, unfortunately.

Peterva
Visitor
1 0 1

I had the same problem but found a solution to bulk change the customer's locale (= notification language).

  1. download your customers
  2. open the .csv in a spreadsheet program
  3. add a column with the title Locale and fill in the desired language code for each customer (you can do this automatically with a formula)
  4. download the spreadsheet as .csv
  5. import this .csv in your customers section (I checked the box "Overwrite existing customers that have the same email or phone")

That's it, all your customers will be updated.

melissaliu
Visitor
1 0 0

Hi, I was trying the method you mentioned here. How am i suppose to find the language code? I'm using Chinese (Traditional). I tried to add a column with title Locale and fill in ZH_TW, but it doesn't work...

afbs2023
Tourist
7 0 9

Hi, this was indeed a very usefull tip!

It worked perfectly when I migrated my customers in the past weeks.

 

But since a few days, Shopify did an update that doesn't allow this anymore.

Whenever you add the "Locale" as a column. The customer import gives and error that the Column Headers to not contain allowed words.

I wonder why they don't allow this, as when migrating shopify shops from one shop to another, and losing the customers locale, is quitte harmfull.

 

I checked the "Batch editor" of customers, to see if they included it there by any chance, but unfortunately also there it is not allowed or possible.

ocs-anna
Shopify Partner
9 0 0

Thank you it help me to find the customers selected language

CarmineT
Shopify Partner
96 2 34

I have same issue.

 

I wonder why shopify does not allow to change customer preferred language like at least with some flow automation

Wonder if any of the shopify staff may help on this

ocs-anna
Shopify Partner
9 0 0

Please give me the some screenshots about this. We will help you

brice514
Tourist
10 0 11

Could @CarmineT and you @ocs-anna please reply publicly in that feed? So we all know the solution. Thank you!

Rashley_LS
Shopify Partner
4 0 4

Hello @brice514 ,

I was recently working on something like this, where we can change customers' default language notifications from Shopify Flow using tags. 

To do so, you first need to create an app from the Shopify Apps setting of your store.

1. Store Settings > Apps and Sales Channel > Develop Apps > Create an app
2. The app must allow read/write customers.
3. In Shopify Flow, Start when customer tags are added > check if the tag is equal to "[tag]" > Send HTTP Request

HTTP REQUEST:

Method: Post
URL: Point to the current version of the API you set in the app (example: https://admin.shopify.com/store/YOUR-STORE/api/2024-01/graphql.json)

Headers:
1.  Key: X-Shopify-Access-Token  Value: YOUR APP ACCESS TOKEN
2. Key: Content-Type Value: application/json

Body:
{"query": "mutation { customerUpdate(input: {id: \"{{ customer.id }}\", locale: \"fr\"}) {customer { id locale } } }"}

Note: fr is the language code for French you can change the Locale code to any language you need.

Now you can add this TAG to all customers you want to change the default notification language and Shopify Flow + App will do the rest.

I hope this helps! Cheers





Rashley | LOAD STUDIOS
faecom1
Excursionist
32 0 4

Hi, is using HTTP request possible on Shopify Basic plan? 

CarmineT
Shopify Partner
96 2 34

unfortunately the use of HTTP request is not enabled in Shopify basic