Jump to content

Multilingual website with language redirect

Recommended Posts

Hello everyone, 

I am currently creating an event website for three different events which follow under the same branding. Since the content won't be the same as the events will be held in different times and with different panelists, I was wondering if there was a way to have a redirect whenever someone enters on the website, based on the browser language -

as for example if you have your language set up as german you will be redirected to /de/home and so on for the other three languages.

Hope this is feasible, thanks as always for your huge help!

Best,

Andrea

 

Link to comment
  • Replies 3
  • Views 6k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

1 hour ago, Drewster said:

I was wondering if there was a way to have a redirect whenever someone enters on the website, based on the browser language -

as for example if you have your language set up as german you will be redirected to /de/home and so on for the other three languages.

 

Yes, it's possible to do this with JavaScript but there are a number of factors to consider. For example, which page(s) do you want to redirect? Do you want to always redirect or prompt visitors to choose? Which languages do you intend do support?

Also, if you post a question that will require code, it helps if you include a link to the site. If the site isn't live, you'll also want to set a password in the visibility settings and share it with us. Without this, we won't be able to view the site.

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

Thanks for the answer Paul,

The website would cover english / german / french with possibility to expand further to spanish and other languages depending on the outcome we get.

I am currently thinking of having the redirect in place only on the Homepage, as they could be interested in the other events held in different languages and I don't want to have a recurring redirect that makes it impossible for them to reach the other event pages. (Happy to hear suggestions if you think there are other best practices)

The website is currently a dummy website  that I am using to test the whole structure out and to make sure that the redirect is feasible itself

https://mypersonaltestingwebsite.squarespace.com/  psw: Allstar98

 

Edited by Drewster
Link to comment
  • 2 years later...
On 4/19/2021 at 11:42 AM, paul2009 said:

 

Yes, it's possible to do this with JavaScript but there are a number of factors to consider. For example, which page(s) do you want to redirect? Do you want to always redirect or prompt visitors to choose? Which languages do you intend do support?

Also, if you post a question that will require code, it helps if you include a link to the site. If the site isn't live, you'll also want to set a password in the visibility settings and share it with us. Without this, we won't be able to view the site.

Hi! Do you have a code that this could be used for? The site I would like to do this on is www.aspiretutoring.eu 

I would like users who's browser is in German to redirect to our german home page with the url slug /deutsch-home

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.