Naomi-lifelab Posted March 1, 2022 Share Posted March 1, 2022 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! 2022-03-01 21-46-14.mp4 Link to comment
Solution paul2009 Posted March 1, 2022 Solution Share Posted March 1, 2022 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 ⬇️ Naomi-lifelab 1 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. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
Naomi-lifelab Posted March 2, 2022 Author Share Posted March 2, 2022 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
Naomi-lifelab Posted March 2, 2022 Author Share Posted March 2, 2022 Just a quick update! It worked for me. 😁 Thank you again! paul2009 1 Link to comment
Nikolas361 Posted June 11, 2023 Share Posted June 11, 2023 Hey there, I installed the code that Brad offers in the link above. But somehow I can't get the multilanguage URL mapping working. Any idea what could have gone wrong? @paul2009? I would appreciate any help! Website: https://www.bieleit-medicus.com/en/about Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment