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
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  ⬇️

Edited by paul2009
Missing link added

About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

Link to comment
2 minutes ago, SollerSjors said:

I do not see that page.

Oops, sorry! I've added it now.

About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.