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

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
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
  • 1 year later...

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.