×

You're using an outdated browser

For a better experience, keep your browser up to date. Check here for the latest version.

Manual

Set a Fallback When Pages Don't Exist in a Language in Scroll Translations

Thomas Walker

Thomas Walker Last update: Aug 7, 2017

If you are working in a multi-language space managed by Scroll Translations, some pages in the space may not always be available in all the languages configured for that space.

When viewing the space through a Viewport, if users try to view a page in a language that hasn't been created for that page, then they are met with a 404 error.

Set a fallback page

To solve this issue and avoid the 404 error, you can redirect users to a fallback page – to the same page but in the space's default language.

Info

It is not currently possible to remove non-relevant languages from the language picker.

To set a fallback page, insert the following snippet of code into the Viewport's error.vm head tag:

#if($alternativeUrl)
<noscript>
<meta http-equiv="refresh" content="0;URL=$alternativeUrl">
</noscript>
<script type="text/javascript">
window.location.replace("$alternativeUrl");
</script>
#end

The code will look like this in the error.vm file:

2x2.12
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: click here.
Ok