Linking to a page on the foundation site
When adding links to content in Wagtail, we need to make sure they will work for all languages, even if this content is not translated.
It’s important because:
- This content may be translated later
- The content it’s linking to may be translated, or could be at some point
- This is forcing a specific language on users, for the rest of their session on our site
When adding an inline link, there are two options:
Using the “Internal link” feature
Search for the English version of the page you want to link to. Wagtail will automatically redirect users to the right version of this page for each language we support.
Using the “External link” feature
It’s acceptable to use an external link to link to an internal page, as long as the locale code (e.g. /en) is removed from the URL. Keeping the locale code in the URL will degrade the experience of our international audience by switching them to a version of the website in a different language where they will be unable to access translated pages when further browsing the website.