Jump to content

Multilingual website: Is it possible to switch language and stay on the specific page (translated), instead of being redirected to homepage whenever clicking the language switcher

Go to solution Solved by paul2009,

Recommended Posts

Site URL: https://lifelab.world/

Hello Squarespace experts!

I would like to confirm if it is possible to remain on the same page but different language whenever I click on the language switcher? What usually happens is when I click on the language that I want to choose, it goes to the home page.

 I am on a SS7.0 business plan using Brine- Impact template. 

With the code currently applied which is bradgood's tutorial, here's what happens as an example:

About us page (EN) > Click on the DE language switcher > Redirects to DE home page > then I will proceed/click to .über uns (about us in German)

Is it possible to do this?

About us (EN) > click on DE language switcher > redirects to .über uns (About us in German)

Thank you so much! 

Link to comment
  • Solution
1 hour ago, Naomi-lifelab said:

I would like to confirm if it is possible to remain on the same page but different language whenever I click on the language switcher? What usually happens is when I click on the language that I want to choose, it goes to the home page.

 I am on a SS7.0 business plan using Brine- Impact template. 

With the code currently applied which is bradgood's tutorial, here's what happens as an example:

About us page (EN) > Click on the DE language switcher > Redirects to DE home page > then I will proceed/click to .über uns (about us in German)

Is it possible to do this?

About us (EN) > click on DE language switcher > redirects to .über uns (About us in German)

Yes, it is! 🙂

You can add some additional script to update the language switcher links according the page currently being viewed.

For example: read the current path such as 'about-us'. Change the EN link to /en/about-us and the DE link to /de/about-us.

There are various ways to do this, some more efficient than others. It should be particularly straightforward to do (probably one line of JS) if the links are written in the same language as my example above, instead of /de/über-uns for the German version.

Brad wrote his own addendum about this: Multi-Language Squarespace Site with URL Mapping.

Did this post help? Please give feedback by clicking an icon below  ⬇️

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
18 hours ago, paul2009 said:

Yes, it is! 🙂

You can add some additional script to update the language switcher links according the page currently being viewed.

For example: read the current path such as 'about-us'. Change the EN link to /en/about-us and the DE link to /de/about-us.

There are various ways to do this, some more efficient than others. It should be particularly straightforward to do (probably one line of JS) if the links are written in the same language as my example above, instead of /de/über-uns for the German version.

Brad wrote his own addendum about this: Multi-Language Squarespace Site with URL Mapping.

Did this post help? Please give feedback by clicking an icon below  ⬇️

This is amazing! Thank you so much @paul2009! I'll give my best in trying to do this! *fingers crossed*

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.