Drewster Posted April 19, 2021 Posted April 19, 2021 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
paul2009 Posted April 19, 2021 Posted April 19, 2021 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. Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Drewster Posted April 19, 2021 Author Posted April 19, 2021 (edited) 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 April 19, 2021 by Drewster
Matthew26 Posted October 6, 2023 Posted October 6, 2023 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment