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

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”.

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

Thanks!

8 Likes

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)

Can someone please help?

1 Like

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.

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

2 Likes

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.

1 Like

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…

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.

5 Likes

Thank you it help me to find the customers selected language

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

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

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

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

2 Likes

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

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