Spanish Pages Installation Tutorial
How to install Spanish pages and link back and fourth between languages / pages
Create a new Index Page (i.e. Licensed Teacher Spanish)
Go to the existing landing page in english and duplicate each sub page and then drag those sub pages into the new Spanish index page (in the same order)
Change the English copy to Spanish and save – images and layout should require no additional modifications other than updating image captions if they exist
Update/Add a Link “View In English” to point back to the English page
Any link within the page with “View In English” turns on the translation of header nav and footer nav elements to be switched to Spanish if the English/Spanish definition is found in the Spanish Dictionary
Updating the Spanish Library
Edit: Spanish Dictionary
When a page is triggered into Spanish mode
Custom Code Installed
SpanishTranslation.js is a custom Javascript file that’s loaded through advanced site code injection.
How it’s Triggered to run
Function checks every paragraph tag within Squarespace content blocks, changes to lower case, then if “view in english” is found, set page as “spanishPage = true” and run the translation library against the top navigation and the footer links.
Testing