Written by Hanseo
Table of Contents
Problem
Squarespace doesn’t have a native component for language change. It does however, have a weglot plugin integration that is not free.
Solution
- Create all sites in all languages, in this case (EN, ES, PT).
- Add all pages on main navigation
- Hide navigation elements that are in a different language through display hidden
- I’ve set the display hidden based on the order of the elements on css
- The issue with that is that every time you add/remove a page you would have to make adjustments on each page code injection…
- On mobile, the order of elements is different because squarespace counts the language dropdown selector differently. So that also needs custom code
- There must be a better way to do this, like a script that displays/hides based on the url “/es, /en, /pt” ?
- Add Logo url to change depending on which language site the page is in
- ie. for Portuguese site logo url should take to cajeropay.com/pt
- Apply same system for footer links
Pros:
Cons:
- Needs some extra love and refactoring for SEO and page speed performance