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

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment
2 minutes ago, SollerSjors said:

I do not see that page.

Oops, sorry! I've added it now.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

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.