Jump to content

Directing visitors to correct language version via their IP address

Recommended Posts

Site URL: https://www.bodegabravoescospriorat.com

Hi,
We have our website in 4 languages.
All working well, but now we are looking for possibility to direct visitorsd to the right language version using their IP address. I found sollution via Georatgetly.com but this subscription gets expense when we get many visitors.
Anybody knows another solution to direct visitors to their langue-version?

Salud from Amsterdam,
Sjors

Link to comment
  • Replies 4
  • Views 969
  • Created
  • Last Reply
7 hours ago, SollerSjors said:

We are looking for possibility to direct visitors to the right language version using their IP address.

Hey Sjors

IP address geolocation isn't usually the most reliable way to set the language, because the country doesn't determine a visitor's language. For example, in Canada they may prefer English or French. In Switzerland they may prefer German, French, Italian or Romansh!

It's better to set the website's language by asking for the visitor's browser 'locale'. For example in Canada the browser locale may be 'en-CA' for English speakers or 'fr-CA' for French.

You can obtain the browser language in JavaScript by checking the navigator.language value. Here's a test page where you can see it working 🙂.

The way that you use this will depend on the JavaScript that you are already using to set the website language. 

I hope this helps.

  If this helps you, please click "Like" below  ⬇️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
2 minutes ago, SollerSjors said:

I do not see that page.

Oops, sorry! I've added it now.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.